CN107315672B - Method and device for monitoring server - Google Patents

Method and device for monitoring server Download PDF

Info

Publication number
CN107315672B
CN107315672B CN201710481839.5A CN201710481839A CN107315672B CN 107315672 B CN107315672 B CN 107315672B CN 201710481839 A CN201710481839 A CN 201710481839A CN 107315672 B CN107315672 B CN 107315672B
Authority
CN
China
Prior art keywords
server
sampling period
monitored
accessed
access
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.)
Expired - Fee Related
Application number
CN201710481839.5A
Other languages
Chinese (zh)
Other versions
CN107315672A (en
Inventor
李德祥
张建
王苏文
于兰彬
赵晓燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xingxuan Technology Co Ltd
Original Assignee
Beijing Xingxuan Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Xingxuan Technology Co Ltd filed Critical Beijing Xingxuan Technology Co Ltd
Priority to CN201710481839.5A priority Critical patent/CN107315672B/en
Publication of CN107315672A publication Critical patent/CN107315672A/en
Application granted granted Critical
Publication of CN107315672B publication Critical patent/CN107315672B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

Methods and apparatus for monitoring a server are disclosed. One embodiment of the method comprises: acquiring a historical accessed log of a server to be monitored, wherein the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether the access is successful or not; determining at least one piece of accessed information of the access time in the historical accessed log in the last sampling period of the current time as a last sampling period accessed information set; determining parameter values of monitoring parameters accessed by the server to be monitored in the last sampling period according to all the accessed information of the last sampling period in the accessed information set of the last sampling period, wherein the monitoring parameters comprise average response time and average success rate; and monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period. This embodiment reduces the load on the monitoring server.

Description

Method and device for monitoring server
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of internet technologies, and in particular, to a method and an apparatus for monitoring a server.
Background
With the rapid development of the internet, there are more and more service providers that provide various services, and all the services are performed by servers. Therefore, in order to ensure that the server can provide normal services to the outside, the server needs to be monitored.
The existing method for monitoring the server is to monitor the server in real time. However, due to the rapid increase in the number of users, the amount of access increases, so that the real-time monitoring server causes an increase in the burden of the monitoring server for monitoring the server, and may even cause the monitoring server for monitoring the server to crash. Therefore, the conventional method for monitoring the server has a problem of high load.
Disclosure of Invention
The present application aims to propose an improved method and apparatus for monitoring a server to solve the technical problems mentioned in the background section above.
An embodiment of the present application provides a1, a method for monitoring a server, where the method includes: acquiring a historical accessed log of a server to be monitored, wherein the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether the access is successful or not; determining at least one piece of accessed information of the access time in the historical accessed log in the last sampling period of the current time as an accessed information set in the last sampling period; determining parameter values of monitoring parameters accessed by a server to be monitored in the last sampling period according to all the last sampling period accessed information in the last sampling period accessed information set, wherein the monitoring parameters comprise average response time and average success rate; and monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
A2, the method as defined above in a1, said method further comprising: acquiring a historical active access log of the server to be monitored, wherein the historical active access log comprises at least one piece of active access information, the active access information comprises a destination server identifier, access time, access response time and an identifier of whether access is successful, and the destination server identifier is used for indicating the server accessed by the server to be monitored; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each target server identifier in the target server identifier set, according to the determined previous sampling period active access information of each previous sampling period in the previous sampling period active access information set, wherein the target server identifier set comprises at least one different target server identifier in the determined previous sampling period active access information of each previous sampling period of the previous sampling period active access information set, and the target server identifier is the same as the target server identifier; and accessing parameter values of monitoring parameters of the servers indicated by the target server identifications in the target server identification set according to the determined last sampling period of the server to be monitored at the current time, and monitoring the server indicated by the server to be monitored and each target server identification in the target server identification set.
A3, the method as defined above in a1, said method further comprising: acquiring an active access path tree of the server to be monitored, wherein each node in the active access path tree includes a server identifier, the server identifier of a root node of the active access path tree is the server identifier of the server to be monitored, and a connecting line between nodes from a parent node to a child node in the active access path tree is used for representing that the server indicated by the server identifier of the parent node accesses the server indicated by the server identifier of the child node; traversing each non-leaf node in the active access path tree starting from the root node, and performing the following inter-node data determination operations: acquiring a historical active access log of a server indicated by the server identifier of the non-leaf node, wherein the acquired historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, an access time, an access response time and an identifier of whether the access is successful or not, wherein the destination server identifier is used for indicating the server accessed by the server indicated by the server identifier of the non-leaf node; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each child node in at least one child node of the non-leaf node, determining a parameter value of a monitoring parameter of a server indicated by a server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period; determining a parameter value of the determined monitoring parameter as inter-node data of an inter-node connection line from the non-leaf node to the child node; and monitoring the server indicated by each node server identifier in the active access path tree according to the data among the nodes of the connecting lines among the nodes in the active access path tree.
A4, the method as described in a1, where the determining, according to each piece of previous sample period visited information in the previous sample period visited information set, a parameter value of a monitoring parameter visited by the server to be monitored in the previous sample period includes: calculating the ratio of the number of pieces of information accessed in the last sampling period, which is identified as the number of pieces of information accessed in the last sampling period, which are successfully accessed or not, to the number of pieces of information accessed in the last sampling period in the accessed information set in the last sampling period, and determining the calculated ratio as the average success rate of the server to be monitored being accessed in the last sampling period; and calculating the average value of the access response time in each piece of previous sampling period access information, wherein whether the access in the previous sampling period access information set is successfully identified as the access success, and determining the calculated average value as the average response time of the access of the server to be monitored in the previous sampling period.
A5, the method as recited in any one of a1-a4, wherein the monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period includes: determining whether the average response time of the server to be monitored accessed in the last sampling period is within a preset response time range; and generating and outputting alarm information for indicating the abnormality of the server to be monitored in response to the fact that the average response time of the server to be monitored accessed in the last sampling period is not within a preset response time range.
A6, the method as in a5, where the monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period further includes: determining whether the average success rate of the server to be monitored accessed in the last sampling period is within a preset success rate range; and in response to the fact that the average success rate of the server to be monitored accessed in the last sampling period is not within a preset success rate range, generating and outputting alarm information for indicating the abnormality of the server to be monitored.
The embodiment of the application provides B1, an apparatus for monitoring a server, the apparatus including: the system comprises a first acquisition unit, a second acquisition unit and a monitoring unit, wherein the first acquisition unit is configured to acquire a historical accessed log of a server to be monitored, the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether access is successful or not; a first determining unit, configured to determine at least one piece of accessed information in the historical accessed log, whose access time is in a previous sample period of a current time, as a previous sample period accessed information set; a second determining unit, configured to determine, according to each piece of previous sampling period visited information in the previous sampling period visited information set, a parameter value of a monitoring parameter visited by the server to be monitored in the previous sampling period, where the monitoring parameter includes an average response time and an average success rate; and the first monitoring unit is configured to monitor the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
B2, the apparatus of B1, further comprising: a second obtaining unit, configured to obtain a historical active access log of the server to be monitored, where the historical active access log includes at least one piece of active access information, and the active access information includes a destination server identifier, an access time, an access response time, and an identifier indicating whether access is successful, where the destination server identifier is used to indicate a server accessed by the server to be monitored; a third determining unit, configured to determine at least one piece of active access information of the access time in the obtained historical active access log in a previous sampling period of the current time as an active access information set in the previous sampling period; a fourth determining unit, configured to determine, for each destination server identifier in the destination server identifier set, a previous sampling period active access information in which the destination server identifier in the determined previous sampling period active access information set is the same as the destination server identifier, and determine a last sampling period of the server to be monitored at the current time and a parameter value of a monitoring parameter for accessing the server indicated by the destination server identifier, where the destination server identifier set is composed of at least one different destination server identifier in the previous sampling period active access information in each determined previous sampling period active access information set; and the second monitoring unit is configured to access parameter values of monitoring parameters of the servers indicated by the destination server identifiers in the destination server identifier set according to the determined last sampling period of the server to be monitored at the current time, and monitor the server to be monitored and the server indicated by each destination server identifier in the destination server identifier set.
B3, the apparatus of B1, further comprising: a third obtaining unit, configured to obtain an active access path tree of the server to be monitored, where each node in the active access path tree includes a server identifier, a server identifier of a root node of the active access path tree is the server identifier of the server to be monitored, and an inter-node connection line from a parent node to a child node in the active access path tree is used to represent that the server indicated by the server identifier of the parent node accesses the server indicated by the server identifier of the child node; a traversal unit configured to traverse each non-leaf node in the active access path tree from the root node, and perform the following inter-node data determination operation: acquiring a historical active access log of a server indicated by the server identifier of the non-leaf node, wherein the acquired historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, an access time, an access response time and an identifier of whether the access is successful or not, wherein the destination server identifier is used for indicating the server accessed by the server indicated by the server identifier of the non-leaf node; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each child node in at least one child node of the non-leaf node, determining a parameter value of a monitoring parameter of a server indicated by a server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period; determining a parameter value of the determined monitoring parameter as inter-node data of an inter-node connection line from the non-leaf node to the child node; and the third monitoring unit is configured to monitor the server indicated by each node server identifier in the active access path tree according to the data between the nodes of the connecting line between the nodes in the active access path tree.
B4, the apparatus as defined in B1, wherein the second determining unit comprises: a first determining module, configured to calculate a ratio of the number of pieces of information accessed in a previous sampling period, where whether access in the previous sampling period is successfully identified as access success, to the number of pieces of information accessed in a previous sampling period in the previous sampling period, and determine the calculated ratio as an average success rate of access of the server to be monitored in the previous sampling period; and a second determining module, configured to calculate an average value of access response times in each piece of previous sampling period visited information, where whether access in the previous sampling period visited information set is successfully identified as access success, and determine the calculated average value as an average response time of the server to be monitored being accessed in the previous sampling period.
B5, the device as defined in any of the above claims B1-B4, the first monitoring unit comprising: a third determining module, configured to determine whether an average response time of the server to be monitored, which is accessed in the previous sampling period, is within a preset response time range; and the first generating module is configured to generate and output alarm information for indicating that the server to be monitored is abnormal in response to determining that the average response time of the server to be monitored accessed in the last sampling period is not within a preset response time range.
B6, the apparatus as defined in B5, wherein the first monitoring unit further comprises: a fourth determining module, configured to determine whether an average success rate of the servers to be monitored being accessed in the previous sampling period is within a preset success rate range; and the second generating module is configured to generate and output alarm information for indicating that the server to be monitored is abnormal in response to determining that the average success rate of the servers to be monitored accessed in the previous sampling period is not within a preset success rate range.
An embodiment of the present application provides C1, a server, where the server includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of implementations a1 through a 6.
The embodiment of the application provides a D1 and a computer-readable storage medium, wherein a computer program is stored on the storage medium, and the computer program is characterized in that when being executed by a processor, the computer program realizes the method as described in any one of the implementation manners of A1 to A6.
According to the method and the device for monitoring the server, the historical accessed log of the server to be monitored is obtained, at least one piece of accessed information of the access time in the historical accessed log in the last sampling period of the current time is determined to be an accessed information set in the last sampling period, then the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period is determined according to the accessed information of each piece in the accessed information set in the last sampling period, and finally the server to be monitored is monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period. Therefore, the monitoring parameters are calculated once every other sampling period, the quasi-real-time monitoring of the server to be monitored is realized, and the load of the monitoring server is reduced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for monitoring a server according to the present application;
fig. 3A and fig. 3B are schematic diagrams of an average response time and an average access success rate of a server to be monitored being accessed according to the present application, respectively;
FIG. 4 is a flow diagram of yet another embodiment of a method for monitoring a server according to the present application;
FIG. 5 is a schematic block diagram illustrating one embodiment of an apparatus for monitoring a server according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for monitoring a server or the apparatus for monitoring a server of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, servers to be monitored 105, 106, 107, a network 108, and a monitoring server 109. The network 104 serves to provide a medium of communication links between the terminal devices 101, 102, 103 and the servers 105, 106, 107 to be monitored. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The network 108 serves as a medium for providing a communication link between the servers 105, 106, 107 to be monitored and the monitoring server 109. Network 108 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user can use the terminal devices 101, 102, 103 to interact with the servers 105, 106, 107 to be monitored via the network 104, to receive or send messages or the like. The terminal devices 101, 102, 103 may have various client applications installed thereon, such as a web browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen including, but not limited to, smart phones, tablet laptop portable computers, desktop computers, and the like.
The servers to be monitored 105, 106, 107 may be servers providing various services, such as background servers providing support for client applications installed on the terminal devices 101, 102, 103. The backend server may analyze and otherwise process the received data such as the service request, and feed back a processing result (e.g., the requested data) to the terminal device.
The monitoring server 109 may be a server providing a monitoring service. For example, a specific service provided by the servers 105, 106, 107 to be monitored is monitored.
It should be noted that the method for monitoring the server provided by the embodiment of the present application is generally performed by the monitoring server 109, and accordingly, the apparatus for monitoring the server is generally disposed in the monitoring server 109.
It should be understood that the numbers of terminal devices, networks, servers to be monitored and monitoring servers in fig. 1 are merely illustrative. There may be any number of terminal devices, networks, servers to be monitored and monitoring servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for monitoring a server in accordance with the present application is shown. The method for monitoring the server comprises the following steps:
step 201, obtaining a history accessed log of a server to be monitored.
In this embodiment, an electronic device (e.g., the monitoring server shown in fig. 1) on which the method for monitoring a server operates may locally or remotely obtain a history accessed log of the server to be monitored from the server to be monitored. The historical accessed log of the server to be monitored comprises at least one piece of accessed information, wherein the accessed information comprises an access time, an access response time and an identifier of whether the access is successful.
Here, the access time, the access response time, and the access success flag in each piece of accessed information in the history accessed log of the server to be monitored are an access start time, an access response time, and an access success flag of the server to be monitored accessed by the terminal device and other servers different from the monitored server, respectively.
Here, the server to be monitored may have a corresponding application installed therein for recording, in real time, access response time for each access of the server to be monitored, and an identifier of whether the access is successful, that is, each piece of accessed information of the server to be monitored may be recorded, and the recorded accessed information may be stored in a history accessed log. For example, the history accessed log may be a preset database or a preset document file.
The access success identifier is used for representing whether the operation of accessing the server to be monitored is successful, that is, whether the server to be monitored successfully provides the service requested by the terminal device or other servers, if so, the access success identifier is an access success identifier, and if not, the access success identifier is an access failure identifier. For example, the access success flag may be represented by "1" and the access failure flag may be represented by "0".
At step 202, at least one piece of accessed information in the historical accessed log, of which the access time is in the last sampling period of the current time, is determined as the accessed information set in the last sampling period.
In this embodiment, based on the historical access log obtained in step 201, the electronic device (e.g., the monitoring server shown in fig. 1) may determine at least one piece of accessed information in the historical access log, where the access time is in the last sample period of the current time, as the previous sample period accessed information set. Here, the sampling period may be set in advance. For example, a default setting (e.g., 1 minute) may be used, or a manual setting may be made by a technician depending on the specifics of the amount of data accessed by the server to be monitored.
Step 203, determining the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period according to each piece of last sampling period accessed information in the previous sampling period accessed information set.
In this embodiment, the monitoring parameters may include an average response time and an average success rate.
In this embodiment, step 203 may be performed as follows:
firstly, a ratio of the number of pieces of information accessed in the last sampling period, which indicates whether the access in the accessed information set in the last sampling period is successful, to the number of pieces of information accessed in the last sampling period in the accessed information set in the last sampling period can be calculated, and the calculated ratio is determined as the average success rate of the access of the server to be monitored in the last sampling period.
Then, it may calculate an average value of access response times in each piece of previous sampling period accessed information, where whether the access in the previous sampling period accessed information set is successfully identified as the access success, and determine the calculated average value as an average response time of the server to be monitored being accessed in the previous sampling period.
And 204, monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
In this embodiment, after determining the parameter value of the monitoring parameter that the server to be monitored is accessed in the last sampling period, the electronic device may monitor the server to be monitored according to the determined parameter value of the monitoring parameter. Therefore, the monitoring server can monitor the server to be monitored once in each sampling period without real-time monitoring, and the sampling period can be adjusted according to actual needs, so that the load of the monitoring server can be reduced.
In some optional implementations of this embodiment, step 204 may be performed as follows:
firstly, whether the average response time of the server to be monitored accessed in the last sampling period is within a preset response time range is determined.
Secondly, if the average response time of the server to be monitored accessed in the last sampling period is determined not to be within the preset response time range, alarm information used for indicating that the server to be monitored is abnormal is generated and output. Here, the alarm information may include at least one of: text, images, and sounds.
As an example, fig. 3A shows average response time of a server to be monitored, which is acquired by a monitoring server every other sampling period. As can be seen from fig. 3A, the sampling period is 1 minute, and the predetermined response time range is 10 milliseconds or less. For the case that the average response time of the server to be monitored accessed in a certain sampling period is greater than 10 milliseconds, the monitoring server may generate and output alarm information indicating that the server to be monitored is abnormal, for example, in fig. 3A, alarm information indicating that the server to be monitored is abnormal is generated in the 4 th minute, the 5 th minute and the 7 th minute respectively.
In some optional implementations of this embodiment, step 204 may also be performed as follows:
first, it may be determined whether an average success rate at which a server to be monitored is accessed in a last sampling period is within a preset success rate range.
And secondly, if the average success rate of the accessed server to be monitored in the last sampling period is determined not to be within the preset success rate range, generating and outputting alarm information for indicating the abnormality of the server to be monitored. Here, the alarm information may include at least one of: text, images, and sounds.
As an example, fig. 3B shows an average access success rate of the servers to be monitored, which is acquired by the monitoring server every other sampling period. As can be seen from fig. 3B, the sampling period is 1 minute, and the predetermined success rate range is greater than or equal to 0.8. For the case that the average access success rate of the server to be monitored accessed in a certain sampling period is less than 0.8, the monitoring server may generate and output alarm information for indicating that the server to be monitored is abnormal, for example, in fig. 3B, alarm information for indicating that the server to be monitored is abnormal is generated in the 1 st minute and the 8 th minute respectively.
In some optional implementations of this embodiment, the electronic device may further perform the following steps 205 to 208 after step 204.
Step 205, obtaining a historical active access log of the server to be monitored.
In this implementation manner, the electronic device may obtain a historical active access log of the server to be monitored from the server to be monitored locally or remotely. The historical active access log comprises at least one piece of active access information, the active access information comprises a destination server identifier, access time, access response time and an identifier of whether access is successful, and the destination server identifier is used for indicating a server accessed by a server to be monitored.
Here, the access time, the access response time, and the identifier of whether the access is successful in each piece of active access information in the history active access log of the server to be monitored are the access start time, the access response time, and the identifier of whether the access is successful of the server indicated by the destination server identifier of the piece of active access information which is actively accessed by the server to be monitored.
Here, the server to be monitored may be installed with a corresponding application for recording in real time a destination server identifier, access time, access response time, and an identifier of whether access is successful or not of each time the server to be monitored actively accesses another server, that is, each piece of active access information of the server to be monitored may be recorded, and the recorded active access information may be stored in a history active access log. For example, the historical active access log may be a preset database or a preset document file.
Here, the access success flag in the active access information is used to represent whether the operation of the server to be monitored actively accessing other servers is successful, that is, whether other servers are successful in providing the service requested by the server to be monitored for the server to be monitored, if so, the access success flag is an access success flag, and if not, the access success flag is an access failure flag. For example, the access success flag may be represented by "1" and the access failure flag may be represented by "0".
And step 206, determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period.
And step 207, for each destination server identifier in the destination server identifier set, according to the determined previous sampling period active access information of each previous sampling period in the destination server identifier set, which is the same as the destination server identifier, determining the parameter value of the monitoring parameter of the server to be monitored in the previous sampling period of the current time and accessing the server indicated by the destination server identifier.
Here, the destination server identification set is composed of destination server identifications different from each other in at least one of the pieces of previous sampling period active access information of the previous sampling period active access information set determined in step 206.
And step 208, accessing parameter values of monitoring parameters of the servers indicated by the destination server identifications in the destination server identification set according to the determined last sampling period of the server to be monitored at the current time, and monitoring the server to be monitored and the server indicated by each destination server identification in the destination server identification set.
In this implementation manner, the electronic device may determine whether the network connection between the server to be monitored and the other server is abnormal through the parameter value of the monitoring parameter for the server to be monitored to access the other server, so as to further determine the specific location of the fault.
According to the method provided by the embodiment of the application, the server to be monitored is monitored in a quasi-real-time mode every other sampling period, so that the load of the monitoring server is reduced.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for monitoring a server is shown. The process 400 of the method for monitoring a server includes the steps of:
step 401, obtaining a history accessed log of a server to be monitored.
At step 402, at least one piece of accessed information in the historical accessed log, wherein the access time is in the last sampling period of the current time, is determined as the last sampling period accessed information set.
Step 403, determining the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period according to each piece of last sampling period accessed information in the previous sampling period accessed information set.
And step 404, monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
In this embodiment, the specific operations in step 401 to step 404 are substantially the same as the specific operations in step 201 to step 204 in the embodiment shown in fig. 2, and are not described again here.
Step 405, obtaining an active access path tree of the server to be monitored.
In this embodiment, an electronic device (e.g., the monitoring server shown in fig. 1) on which the method for monitoring a server operates may obtain an active access path tree of the server to be monitored from the server to be monitored locally or remotely.
Here, each node in the active access path tree may include a server identification. The server identifier of the root node of the active access path tree may be a server identifier of a server to be monitored. The inter-node connecting line from the parent node to the child node in the active access path tree may be used to characterize the server indicated by the server identification of the parent node to access the server indicated by the server identification of the child node.
Here, the electronic device may store an active access path tree of the server to be monitored locally or in the server to be monitored in advance. In the process of providing the service for the terminal device, some services may be completed by the server to be monitored, while some services need to be completed by the server to be monitored sending a request to another server, and the other server may need to send a request to another server. In practice, the server to be monitored sends a request to which other servers are basically unchanged, and the other servers send requests to which other servers are also basically unchanged, so that an active access path tree can be set for the server to be monitored in advance to record the active access path of the server to be monitored. In the active access path tree, a root node corresponds to a server to be monitored, each node corresponds to a corresponding server, and for each child node, a connecting line from a parent node of the child node to the child node indicates that the server corresponding to the parent node of the child node sends a service request to the child node.
Step 406, traverse each non-leaf node in the active access path tree from the root node, and perform the inter-node data determination operation.
In this embodiment, the electronic device may traverse each non-leaf node in the active access path tree from the root node of the active access path tree obtained in step 405, and perform the following inter-node data determination operations:
first, a historical active access log of the server indicated by the server identification of the non-leaf node is obtained.
Here, the obtained history active access log includes at least one piece of active access information, and the active access information includes destination server identification, access time, access response time, and identification of whether access was successful, where the destination server identification is used to indicate a server accessed by a server indicated by the server identification of the non-leaf node.
Here, the server indicated by the server identifier of each non-leaf node is installed with a corresponding application for recording in real time the access time, the access response time, and the identifier of whether the access is successful or not of the server indicated by the server identifier of each child node where the server actively accesses the non-leaf node each time, that is, the active access information may be recorded, and the recorded active access information may be stored in the history active access log. For example, the historical active access log may be a preset database or a preset document file.
And then, determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period.
Then, for each child node in at least one child node of the non-leaf node, according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period, determining a parameter value of a monitoring parameter of a server indicated by the server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period.
Here, the monitoring parameters may include an average response time and an average success rate.
Finally, the parameter value of the determined monitoring parameter is determined as the internode data of the internode connecting line from the non-leaf node to the child node.
Step 407, monitoring the server indicated by each node server identifier in the active access path tree according to the inter-node data of the connection line between each node in the active access path tree.
In this embodiment, since the inter-node data of the inter-node connection lines in the active access path tree records the parameter value of the monitoring parameter of the server corresponding to the parent node that accesses the server corresponding to the child node in the last sampling period, the electronic device may monitor the server indicated by each node server identifier in the active access path tree according to the inter-node data of the inter-node connection lines in the active access path tree. Namely, by actively accessing the data among the nodes of the connecting lines among the nodes in the path tree, the analysis of the call chain of the server to be monitored is realized, so that the fault point can be accurately positioned.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the method for monitoring a server in this embodiment highlights a traversal step of performing an operation of determining data between nodes on non-leaf nodes in an active access path tree of a server to be monitored, and a step of monitoring a server indicated by each node server identifier in the active access path tree according to the determined data between nodes of each inter-node connection line. Therefore, the scheme described in the embodiment can realize analysis of the call chain of the server to be monitored, so that the fault is more accurately positioned, and the monitoring efficiency is improved.
With further reference to fig. 5, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for monitoring a server, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for monitoring a server of the present embodiment includes: a first acquisition unit 501, a first determination unit 502, a second determination unit 503, and a first monitoring unit 504. The first obtaining unit 501 is configured to obtain a history accessed log of a server to be monitored, where the history accessed log includes at least one piece of accessed information, and the accessed information includes access time, access response time, and an identifier indicating whether access is successful; a first determining unit 502, configured to determine at least one piece of accessed information in the historical accessed log, where the access time is in a previous sample period of the current time, as a previous sample period accessed information set; a second determining unit 503, configured to determine, according to each piece of previous sampling period visited information in the previous sampling period visited information set, a parameter value of a monitoring parameter that is visited by the server to be monitored in the previous sampling period, where the monitoring parameter includes an average response time and an average success rate; the first monitoring unit 504 is configured to monitor the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the previous sampling period.
In this embodiment, specific processes of the first obtaining unit 501, the first determining unit 502, the second determining unit 503 and the first monitoring unit 504 of the apparatus 500 for monitoring a server and technical effects brought by the specific processes can refer to related descriptions of step 201, step 202, step 203 and step 204 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of this embodiment, the apparatus 500 may further include: a second obtaining unit 505, configured to obtain a historical active access log of the server to be monitored, where the historical active access log includes at least one piece of active access information, and the active access information includes a destination server identifier, an access time, an access response time, and an identifier indicating whether access is successful, where the destination server identifier is used to indicate a server accessed by the server to be monitored; a third determining unit 506, configured to determine at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; a fourth determining unit 507, configured to determine, for each destination server identifier in the destination server identifier set, active access information of each previous sampling period in the determined previous sampling period, where the destination server identifier set is composed of at least one different destination server identifier in the determined previous sampling period active access information of each previous sampling period in the active access information set of the previous sampling period, and the active access information of each destination server in the active access information set of the previous sampling period is the same as the destination server identifier, and determine a parameter value of a monitoring parameter of the server to be monitored, which is in the previous sampling period at the current time, and accesses the server indicated by the destination server identifier; a second monitoring unit 508, configured to access parameter values of monitoring parameters of servers indicated by each destination server identifier in the destination server identifier set according to a last sampling period of the determined server to be monitored at the current time, and monitor the server indicated by the server to be monitored and each destination server identifier in the destination server identifier set. The specific processing of the second obtaining unit 505, the third determining unit 506, the fourth determining unit 507 and the second monitoring unit 508 and the technical effects thereof can refer to the related descriptions of step 205, step 206, step 207 and step 208 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of this embodiment, the apparatus 500 may further include: a third obtaining unit 509, configured to obtain an active access path tree of the server to be monitored, where each node in the active access path tree includes a server identifier, a server identifier of a root node of the active access path tree is the server identifier of the server to be monitored, and an inter-node connection line from a parent node to a child node in the active access path tree is used to represent that the server indicated by the server identifier of the parent node accesses the server indicated by the server identifier of the child node; a traversal unit 510 configured to traverse each non-leaf node in the active access path tree starting from the root node, and perform the following inter-node data determination operations: acquiring a historical active access log of a server indicated by the server identifier of the non-leaf node, wherein the acquired historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, an access time, an access response time and an identifier of whether the access is successful or not, wherein the destination server identifier is used for indicating the server accessed by the server indicated by the server identifier of the non-leaf node; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each child node in at least one child node of the non-leaf node, determining a parameter value of a monitoring parameter of a server indicated by a server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period; determining a parameter value of the determined monitoring parameter as inter-node data of an inter-node connection line from the non-leaf node to the child node; the third monitoring unit 511 is configured to monitor the server indicated by each node server identifier in the active access path tree according to the inter-node data of the connection line between the nodes in the active access path tree. The specific processing of the third obtaining unit 509, the traversing unit 510, and the third monitoring unit 511 and the technical effects thereof can refer to the related descriptions of step 405, step 406, and step 407 in the corresponding embodiment of fig. 4, which are not repeated herein.
In some optional implementations of this embodiment, the second determining unit 503 may include: a first determining module 5031, configured to calculate a ratio between the number of pieces of information accessed in a previous sampling period, where whether access in the previous sampling period is successfully identified as access success, in the accessed information set and the number of pieces of information accessed in a previous sampling period in the accessed information set, and determine the calculated ratio as an average success rate of accessing the server to be monitored in the previous sampling period; a second determining module 5032, configured to calculate an average value of access response times in the previous sampling period visited information pieces identified as access success in the previous sampling period visited information set whether the access was successful, and determine the calculated average value as an average response time of the access of the server to be monitored in the previous sampling period. The detailed processing of the first determining module 5031 and the second determining module 5032 and the technical effects thereof can refer to the related description of step 203 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some optional implementations of this embodiment, the first monitoring unit 504 may include: a third determining module 5041, configured to determine whether an average response time of the server to be monitored accessed in the previous sampling period is within a preset response time range; a first generating module 5042, configured to generate and output alarm information indicating that the server to be monitored is abnormal in response to determining that the average response time of the server to be monitored accessed in the previous sampling period is not within a preset response time range. For the detailed processing of the third determining module 5041 and the first generating module 5042 and the technical effects thereof, reference may be made to the related description of step 204 in the corresponding embodiment of fig. 2, which is not repeated herein.
In some optional implementation manners of this embodiment, the first monitoring unit may further include: a fourth determining module 5043, configured to determine whether an average success rate of the access of the server to be monitored in the previous sampling period is within a preset success rate range; a second generating module 5044, configured to generate and output alarm information indicating that the server to be monitored is abnormal in response to determining that the average success rate of the server to be monitored accessed in the previous sampling period is not within a preset success rate range. For specific processing of the fourth determining module 5043 and the second generating module 5044 and technical effects thereof, reference may be made to related descriptions in step 204 in the corresponding embodiment of fig. 2, which are not repeated herein.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 606 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: a storage portion 606 including a hard disk and the like; and a communication section 607 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 607 performs communication processing via a network such as the internet. Drivers 608 are also connected to the I/O interface 605 as needed. A removable medium 609 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 608 as necessary, so that a computer program read out therefrom is mounted into the storage section 606 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 607 and/or installed from the removable medium 609. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first acquisition unit, a first determination unit, a second determination unit, and a first monitoring unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the first obtaining unit may also be described as a "unit that obtains a history accessed log of the server to be monitored".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring a historical accessed log of a server to be monitored, wherein the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether the access is successful or not; determining at least one piece of accessed information of the access time in the historical accessed log in the last sampling period of the current time as an accessed information set in the last sampling period; determining parameter values of monitoring parameters accessed by a server to be monitored in the last sampling period according to all the last sampling period accessed information in the last sampling period accessed information set, wherein the monitoring parameters comprise average response time and average success rate; and monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. A method for monitoring a server, the method comprising:
acquiring a historical accessed log of a server to be monitored, wherein the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether the access is successful or not;
determining at least one piece of accessed information of the historical accessed log, the access time of which is in the last sampling period of the current time, as a last sampling period accessed information set;
determining parameter values of monitoring parameters accessed by a server to be monitored in the previous sampling period according to each piece of previous sampling period accessed information in the previous sampling period accessed information set, wherein the monitoring parameters comprise average response time and average success rate;
and monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period.
2. The method of claim 1, further comprising:
acquiring a historical active access log of the server to be monitored, wherein the historical active access log comprises at least one piece of active access information, the active access information comprises a destination server identifier, access time, access response time and an identifier of whether access is successful, and the destination server identifier is used for indicating the server accessed by the server to be monitored;
determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period;
for each destination server identifier in the destination server identifier set, according to the determined previous sampling period active access information of the destination server identifier in the previous sampling period active access information set, which is the same as the destination server identifier, determining a previous sampling period of the server to be monitored at the current time and a parameter value of a monitoring parameter for accessing the server indicated by the destination server identifier, wherein the destination server identifier set is composed of at least one different destination server identifier in the determined previous sampling period active access information of each destination server identifier in the previous sampling period active access information set;
and accessing parameter values of monitoring parameters of the servers indicated by the target server identifications in the target server identification set according to the determined last sampling period of the server to be monitored at the current time, and monitoring the server to be monitored and the server indicated by each target server identification in the target server identification set.
3. The method of claim 1, further comprising:
acquiring an active access path tree of the server to be monitored, wherein each node in the active access path tree comprises a server identifier, the server identifier of a root node of the active access path tree is the server identifier of the server to be monitored, and a connecting line between nodes from a parent node to a child node in the active access path tree is used for representing that the server indicated by the server identifier of the parent node accesses the server indicated by the server identifier of the child node;
traversing each non-leaf node in the active access path tree starting from the root node, performing the following inter-node data determination operations: acquiring a historical active access log of a server indicated by the server identifier of the non-leaf node, wherein the acquired historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, an access time, an access response time and an identifier of whether the access is successful or not, wherein the destination server identifier is used for indicating the server accessed by the server indicated by the server identifier of the non-leaf node; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each child node in at least one child node of the non-leaf node, determining a parameter value of a monitoring parameter of a server indicated by a server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period; determining a parameter value of the determined monitoring parameter as inter-node data of an inter-node connection line from the non-leaf node to the child node;
and monitoring the server indicated by each node server identifier in the active access path tree according to the data among the nodes of the connecting line among the nodes in the active access path tree.
4. The method of claim 1, wherein the determining, according to each piece of last sampling period visited information in the previous sampling period visited information set, a parameter value of a monitoring parameter visited by a server to be monitored in the last sampling period comprises:
calculating the ratio of the number of pieces of information accessed in the last sampling period, which is identified as the number of pieces of information accessed in the last sampling period and is successfully accessed or not, to the number of pieces of information accessed in the last sampling period in the accessed information set in the last sampling period, and determining the calculated ratio as the average success rate of the server to be monitored being accessed in the last sampling period;
and calculating the average value of the access response time in each piece of previous sampling period accessed information, wherein whether the access in the previous sampling period accessed information set is successfully identified as the access, and determining the calculated average value as the average response time of the server to be monitored accessed in the previous sampling period.
5. The method according to any one of claims 1 to 4, wherein the monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period comprises:
determining whether the average response time of the server to be monitored accessed in the last sampling period is within a preset response time range;
and in response to the fact that the average response time of the server to be monitored accessed in the last sampling period is not within a preset response time range, generating and outputting alarm information for indicating that the server to be monitored is abnormal.
6. The method according to claim 5, wherein the monitoring the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the last sampling period further comprises:
determining whether the average success rate of the server to be monitored accessed in the last sampling period is within a preset success rate range;
and in response to the fact that the average success rate of the server to be monitored accessed in the last sampling period is not within a preset success rate range, generating and outputting alarm information for indicating the abnormality of the server to be monitored.
7. An apparatus for monitoring a server, the apparatus comprising:
the system comprises a first obtaining unit, a second obtaining unit and a monitoring unit, wherein the first obtaining unit is configured to obtain a historical accessed log of a server to be monitored, the historical accessed log comprises at least one piece of accessed information, and the accessed information comprises access time, access response time and an identifier of whether access is successful or not;
a first determining unit, configured to determine at least one piece of accessed information in the historical accessed log, whose access time is within a previous sampling period of a current time, as a previous sampling period accessed information set;
a second determining unit, configured to determine, according to each piece of previous sampling period visited information in the previous sampling period visited information set, a parameter value of a monitoring parameter visited by the server to be monitored in the previous sampling period, where the monitoring parameter includes an average response time and an average success rate;
and the first monitoring unit is configured to monitor the server to be monitored according to the parameter value of the monitoring parameter accessed by the server to be monitored in the previous sampling period.
8. The apparatus of claim 7, further comprising:
the second obtaining unit is configured to obtain a historical active access log of the server to be monitored, wherein the historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, access time, access response time and an identifier indicating whether access is successful or not, and the destination server identifier is used for indicating the server accessed by the server to be monitored;
a third determining unit, configured to determine at least one piece of active access information of the access time in the obtained historical active access log in a previous sampling period of the current time as an active access information set in the previous sampling period;
a fourth determining unit, configured to determine, for each destination server identifier in a destination server identifier set, active access information of each previous sampling period, where the destination server identifier in the determined previous sampling period active access information set is the same as the destination server identifier, of the server to be monitored in the previous sampling period at the current time, and determine a parameter value of a monitoring parameter for accessing the server indicated by the destination server identifier, where the destination server identifier set is composed of at least one destination server identifier, where the destination server identifier is different from the determined destination server identifier, in the active access information of each previous sampling period in the previous sampling period;
and the second monitoring unit is configured to access parameter values of monitoring parameters of the servers indicated by the destination server identifiers in the destination server identifier set according to the determined last sampling period of the server to be monitored at the current time, and monitor the server to be monitored and the server indicated by each destination server identifier in the destination server identifier set.
9. The apparatus of claim 7, further comprising:
a third obtaining unit, configured to obtain an active access path tree of the server to be monitored, where each node in the active access path tree includes a server identifier, a server identifier of a root node of the active access path tree is the server identifier of the server to be monitored, and an inter-node connection line from a parent node to a child node in the active access path tree is used to represent that the server indicated by the server identifier of the parent node accesses the server indicated by the server identifier of the child node;
a traversal unit configured to traverse each non-leaf node in the active access path tree starting from the root node, and perform the following inter-node data determination operations: acquiring a historical active access log of a server indicated by the server identifier of the non-leaf node, wherein the acquired historical active access log comprises at least one piece of active access information, and the active access information comprises a destination server identifier, an access time, an access response time and an identifier of whether the access is successful or not, wherein the destination server identifier is used for indicating the server accessed by the server indicated by the server identifier of the non-leaf node; determining at least one piece of active access information of the access time in the last sampling period of the current time in the acquired historical active access log as an active access information set in the last sampling period; for each child node in at least one child node of the non-leaf node, determining a parameter value of a monitoring parameter of a server indicated by a server identifier of the non-leaf node accessing the server indicated by the server identifier of the child node in the last sampling period according to each piece of active access information of which the destination server identifier is the same as the server identifier of the child node in each piece of active access information of the determined active access information set in the last sampling period; determining a parameter value of the determined monitoring parameter as inter-node data of an inter-node connection line from the non-leaf node to the child node;
and the third monitoring unit is configured to monitor the server indicated by each node server identifier in the active access path tree according to the data between the nodes of the connecting line between the nodes in the active access path tree.
10. The apparatus according to claim 7, wherein the second determining unit comprises:
a first determining module, configured to calculate a ratio of the number of pieces of information accessed in a previous sampling period, where whether access in the previous sampling period is successfully identified as access success, to the number of pieces of information accessed in a previous sampling period in the previous sampling period, and determine a calculated ratio as an average success rate of access of the server to be monitored in the previous sampling period;
and the second determining module is configured to calculate an average value of access response times in each piece of previous sampling period visited information, where whether access in the previous sampling period visited information set is successfully identified as access, and determine the calculated average value as an average response time of the server to be monitored being accessed in the previous sampling period.
11. The apparatus according to any one of claims 7-10, wherein the first monitoring unit comprises:
a third determining module, configured to determine whether an average response time of the server to be monitored, which is accessed in the previous sampling period, is within a preset response time range;
and the first generation module is configured to generate and output alarm information for indicating that the server to be monitored is abnormal in response to determining that the average response time of the server to be monitored accessed in the last sampling period is not within a preset response time range.
12. The apparatus of claim 11, wherein the first monitoring unit further comprises:
a fourth determining module, configured to determine whether an average success rate of the servers to be monitored being accessed in the previous sampling period is within a preset success rate range;
and the second generating module is configured to generate and output alarm information for indicating that the server to be monitored is abnormal in response to determining that the average success rate of the server to be monitored accessed in the previous sampling period is not within a preset success rate range.
13. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201710481839.5A 2017-06-22 2017-06-22 Method and device for monitoring server Expired - Fee Related CN107315672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710481839.5A CN107315672B (en) 2017-06-22 2017-06-22 Method and device for monitoring server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710481839.5A CN107315672B (en) 2017-06-22 2017-06-22 Method and device for monitoring server

Publications (2)

Publication Number Publication Date
CN107315672A CN107315672A (en) 2017-11-03
CN107315672B true CN107315672B (en) 2020-08-21

Family

ID=60183986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710481839.5A Expired - Fee Related CN107315672B (en) 2017-06-22 2017-06-22 Method and device for monitoring server

Country Status (1)

Country Link
CN (1) CN107315672B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981459B (en) * 2019-02-28 2021-02-19 联想(北京)有限公司 Information sending method, client and computer readable storage medium
CN113032225B (en) * 2021-05-24 2021-08-06 上海有孚智数云创数字科技有限公司 Monitoring data processing method, device and equipment of data center and storage medium
CN113721570A (en) * 2021-08-30 2021-11-30 通威太阳能(成都)有限公司 Data monitoring method, device, system and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767653A (en) * 2015-01-29 2015-07-08 小米科技有限责任公司 Method and device for monitoring network interfaces
CN105187554A (en) * 2015-09-29 2015-12-23 北京京东尚科信息技术有限公司 Method and system for monitoring server performance
CN105468492A (en) * 2015-11-17 2016-04-06 中国建设银行股份有限公司 SE(search engine)-based data monitoring method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6623692B2 (en) * 2015-11-02 2019-12-25 富士通株式会社 Log information collection system, log information collection program and log information collection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767653A (en) * 2015-01-29 2015-07-08 小米科技有限责任公司 Method and device for monitoring network interfaces
CN105187554A (en) * 2015-09-29 2015-12-23 北京京东尚科信息技术有限公司 Method and system for monitoring server performance
CN105468492A (en) * 2015-11-17 2016-04-06 中国建设银行股份有限公司 SE(search engine)-based data monitoring method and system

Also Published As

Publication number Publication date
CN107315672A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN108900776B (en) Method and apparatus for determining response time
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
CN108769214B (en) Method and apparatus for controlling edge computing device, and method and apparatus for updating data
CN106874135B (en) Method, device and equipment for detecting machine room fault
CN108933695B (en) Method and apparatus for processing information
CN110737726B (en) Method and device for determining test data of interface to be tested
CN107315672B (en) Method and device for monitoring server
CN110737655B (en) Method and device for reporting data
CN110647460A (en) Test resource management method and device and test client
CN107403112B (en) Data checking method and equipment thereof
CN114840379A (en) Log generation method, device, server and storage medium
CN111161072A (en) Block chain-based random number generation method, equipment and storage medium
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN112887355B (en) Service processing method and device for abnormal server
CN109194567B (en) Method and apparatus for retransmitting information
CN108933802B (en) Method and apparatus for monitoring operation
CN111338928A (en) Chrome-based browser testing method and device
CN109889402B (en) Method and apparatus for generating information
CN113138935A (en) Program testing method and device, electronic equipment and storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN113132447A (en) Reverse proxy method and system
CN111290873A (en) Fault processing method and device
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN111950232A (en) Method and device for automatically switching number segments
CN111460270B (en) Information pushing method and device

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
CB02 Change of applicant information

Address after: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200821