CN111274081A - A method and device for monitoring the running state of a server - Google Patents
A method and device for monitoring the running state of a server Download PDFInfo
- Publication number
- CN111274081A CN111274081A CN201811475886.XA CN201811475886A CN111274081A CN 111274081 A CN111274081 A CN 111274081A CN 201811475886 A CN201811475886 A CN 201811475886A CN 111274081 A CN111274081 A CN 111274081A
- Authority
- CN
- China
- Prior art keywords
- server
- group leader
- group
- network segment
- monitoring
- 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.)
- Pending
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 73
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012806 monitoring device Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 abstract description 14
- 238000004891 communication Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Debugging And Monitoring (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及计算机技术领域,更具体地,涉及一种服务器运行状态监测方法和装置。Embodiments of the present invention relate to the technical field of computers, and more particularly, to a method and apparatus for monitoring the running state of a server.
背景技术Background technique
随着企业信息化建设的不断深入,各种应用和管理系统的陆续上线,提供信息服务的信息系统的种类与数量持续增加,如财务管控系统、营销系统、协同办公系统、人资管控系统等多种业务系统,信息系统的运行情况和企业各部门业务的捆绑越来越紧密,而这些重要的业务系统都部署在各类服务器中,相应的对服务器的安全、运营和维护管理的要求也越来越高,由于各系统功能复杂且运行的服务器硬件来自不同厂商,维护人员疲于应对多套管理工具,出现了多种形式的告警和分散的故障,如何确保这些服务器的稳定运行,如何能够在第一时间发现并解决操作隐患、性能瓶颈或故障,成为亟待解决的问题。With the continuous deepening of enterprise informatization construction, various applications and management systems have been launched one after another, and the types and numbers of information systems that provide information services continue to increase, such as financial management and control systems, marketing systems, collaborative office systems, and human resources management and control systems. A variety of business systems, the operation of information systems and the business of various departments of the enterprise are more and more closely tied, and these important business systems are deployed in various servers, and the corresponding requirements for server security, operation and maintenance management are also More and more, due to the complex functions of each system and the server hardware running from different manufacturers, maintenance personnel are tired of dealing with multiple sets of management tools, and various forms of alarms and scattered faults have occurred. How to ensure the stable operation of these servers? Being able to discover and solve operational hidden dangers, performance bottlenecks or failures at the first time has become an urgent problem to be solved.
现有服务器运行状态的监测方法通常包括两种,一种是由服务器定期向监测软件报告自身的运行状态,或由监测软件定期向被监测服务器询问运行状态,一般需要在监测服务器端进行配置;另一种是监测软件定期向被监测服务器所在网段的路由设备获取网络运行状态数据,判断网段中存在的运行的服务器,但只能判断服务器是否存活,而且对于很少对网段外主机通信的服务器,存在误判的可能。There are usually two methods for monitoring the running status of the existing server. One is that the server periodically reports its running status to the monitoring software, or the monitoring software regularly asks the monitored server for the running status, which generally needs to be configured on the monitoring server side; The other is that the monitoring software periodically obtains network operating status data from the routing device on the network segment where the monitored server is located, and judges the running server in the network segment, but it can only judge whether the server is alive or not. Communication server, there is the possibility of misjudgment.
目前使用的监测方法存在大量的跨网段的通信,一方面由于网段间可能存在的防火墙设备可能阻断被监测服务器与监测软件,导致监测数据失真;另一方面,每台服务器都需要频繁与监测软件进行网络通信,在监测周期较短时,会造成大量的数据包传输,增加了网络传输的压力。The monitoring method currently used has a large amount of communication across network segments. On the one hand, the firewall equipment that may exist between the network segments may block the monitored server and the monitoring software, resulting in distortion of monitoring data; on the other hand, each server requires frequent Network communication with monitoring software will cause a large number of data packet transmission when the monitoring period is short, increasing the pressure of network transmission.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供一种克服上述问题或者至少部分地解决上述问题的一种服务器运行状态监测方法和装置。Embodiments of the present invention provide a method and apparatus for monitoring the running state of a server that overcomes the above problem or at least partially solves the above problem.
第一方面,本发明实施例提供一种服务器运行状态监测方法,包括:In a first aspect, an embodiment of the present invention provides a method for monitoring a server running state, including:
服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;After the server is turned on, it sends the running status data to the preset group leader under the same network protocol IP network segment at the first interval;
服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。The server monitoring end receives the running status data reported by the group leader under each IP network segment at a second interval, and monitors the running status of each server according to the running status data.
第二方面,本发明实施例提供一种服务器运行状态监测装置,其特征在于,包括:In a second aspect, an embodiment of the present invention provides a server operating state monitoring device, characterized in that it includes:
代理模块,用于使服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;The proxy module is used to enable the server to send running status data to the group leader preset under the same network protocol IP network segment at the first time interval after the server is turned on;
服务器监测端,用于每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。The server monitoring terminal is configured to receive the running status data reported by the group leader under each IP network segment at a second interval, and monitor the running status of each server according to the running status data.
第三方面,本发明实施例提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如第一方面所提供的服务器运行状态监测方法的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, the processor implementing the program as described in the first aspect when the processor executes the program Provide the steps of the server running status monitoring method.
第四方面,本发明实施例提供一种非暂态计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所提供的服务器运行状态监测方法的步骤。In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method for monitoring the running state of a server provided in the first aspect. step.
本发明实施例提出了一种服务器运行状态监测方法和装置,利用同网段的组长收集本网段的中各服务器运行状态数据,没有跨网段传输,数据传输范围小,更加可靠;每个网段的组长的数量可以通过该网段中所有服务器进行设定,与配置控制软件和管理软件无关,网段管理人员可以进行自主管理,具有良好的个性化配置能力;使同一网段的各服务器设置的组长数量不一致也不会影响系统的功能,具有较好的配置宽容度;组员的状态数据会经过多个组长进行上报,只需任何一个组长上报数据成功,就可以获知该组员的运行状态信息,具有很高的系统可用性。The embodiment of the present invention provides a method and device for monitoring the running state of a server. The team leader of the same network segment is used to collect the running state data of each server in the network segment, without cross-network segment transmission, the data transmission range is small, and it is more reliable; The number of group leaders of a network segment can be set by all servers in the network segment, regardless of the configuration control software and management software. Inconsistency in the number of group leaders set by each server will not affect the function of the system, and it has a good configuration tolerance; the status data of group members will be reported by multiple group leaders. You can learn the running status information of the group members, which has high system availability.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为根据本发明实施例的服务器运行状态监测方法示意图;1 is a schematic diagram of a method for monitoring a server running state according to an embodiment of the present invention;
图2为根据本发明实施例的服务器运行状态监测装置示意图;FIG. 2 is a schematic diagram of a server operating state monitoring device according to an embodiment of the present invention;
图3为根据本发明实施例的电子设备的实体结构示意图。FIG. 3 is a schematic diagram of a physical structure of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
由于目前使用的监测方法存在大量的跨网段的通信,一方面由于网段间可能存在的防火墙设备可能阻断被监测服务器与监测软件,导致监测数据失真;另一方面,每台服务器都需要频繁与监测软件进行网络通信,在监测周期较短时,会造成大量的数据包传输,增加了网络传输的压力。因此本发明各实施例针利用同网段的组长收集本网段的中各服务器运行状态数据,没有跨网段传输,数据传输范围小,更加可靠。以下将通过多个实施例进行展开说明和介绍。Due to the large amount of communication across network segments in the currently used monitoring methods, on the one hand, firewall devices that may exist between network segments may block the monitored server and monitoring software, resulting in distortion of monitoring data; on the other hand, each server needs to Frequent network communication with monitoring software will cause a large number of data packet transmission when the monitoring period is short, increasing the pressure of network transmission. Therefore, in the embodiments of the present invention, the group leader of the same network segment is used to collect the operating status data of each server in the network segment, without cross-network segment transmission, the data transmission range is small, and it is more reliable. The following will expand the description and introduction through multiple embodiments.
图1为本发明实施例提供的一种服务器运行状态监测方法,包括:FIG. 1 is a method for monitoring the running state of a server provided by an embodiment of the present invention, including:
S1、服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;S1. After the server is turned on, it sends the running status data to the group leader preset under the same network protocol IP network segment at the first time interval;
S2、服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。S2. The server monitoring terminal receives the running status data reported by the group leader under each IP network segment at a second interval, and monitors the running status of each server according to the running status data.
具体的,在本实施例中,通过在同一IP网段中设置组长角色,通过组长统计对应IP网段中各服务器的运行状态,并统一上报,没有跨网段传输,数据传输范围小,更加可靠。Specifically, in this embodiment, by setting the role of the group leader in the same IP network segment, the group leader can count the running status of each server in the corresponding IP network segment, and report it uniformly. There is no cross-network segment transmission, and the data transmission range is small. , more reliable.
并且,每一个IP网段中设置多个组长,在本实施例中设置为3个,每一个IP网段下组长数量可设定,组长不向自身发送运行状态数据,但会向其他组长发送自身运行状态数据;即若IP网段中设置有A、B、C三个组长,组长A接收该IP网段中除了A以外的所有服务器(包括B、C)的运行状态数据;即组长接收对应IP网段中除了自身以外的所有服务器的运行状态数据。同时,在本实施例中,服务器会向对应IP网段中的所有组长发送运行状态数据,因此,组员的状态数据会经过多个组长进行上报,只需任何一个组长上报数据成功,就可以获知该组员的运行状态信息,具有很高的系统可用性。In addition, each IP network segment is set with multiple team leaders, which are set to 3 in this embodiment. The number of team leaders under each IP network segment can be set. The team leader does not send running status data to itself, but will Other group leaders send their own operating status data; that is, if there are three group leaders A, B, and C in the IP network segment, group leader A receives the operation of all servers (including B and C) except A in the IP network segment. Status data; that is, the group leader receives the running status data of all servers in the corresponding IP network segment except itself. At the same time, in this embodiment, the server will send the running status data to all the group leaders in the corresponding IP network segment. Therefore, the status data of the group members will be reported by multiple group leaders, and only any group leader needs to report the data successfully. , you can know the running status information of the group member, which has high system availability.
在上述实施例的基础上,服务器在开启前,还包括:On the basis of the above embodiment, before the server is started, it further includes:
服务器设定IP网段下的预设组长数量,服务器监测端根据预设组长数量将对应IP网段下多个服务器预先设置为组长,剩余服务器设置为组员;The server sets the preset number of group leaders under the IP network segment, and the server monitoring terminal pre-sets multiple servers under the corresponding IP network segment as group leaders according to the preset number of group leaders, and the remaining servers are set as group members;
服务器监测端获取各IP网段下组长的IP地址,并建立各IP网段对应的组长IP地址信息表,所述组长IP地址表中保存了对应IP网段与组长IP地址的对应关系。The monitoring terminal of the server obtains the IP addresses of the group leaders under each IP network segment, and establishes the group leader IP address information table corresponding to each IP network segment. The group leader IP address table stores the corresponding IP network segment and the group leader IP address. Correspondence.
在本实施例中,预设组长数量通过服务器本身设定,且在设定后,将设定数量同步至对应IP网段下各服务器中,保证了同一IP网段下各服务器的一致性,使同一网段的各服务器设置的组长数量不一致也不会影响系统的功能,具有较好的配置宽容度,并将预设组长数量上报至服务器监测端,服务器监测端根据预设组长数量将对应IP网段下多个服务器预先设置为组长,剩余服务器设置为组员。In this embodiment, the preset number of group leaders is set by the server itself, and after the setting, the set number is synchronized to each server under the corresponding IP network segment to ensure the consistency of each server under the same IP network segment , so that the number of team leaders set by each server in the same network segment is inconsistent, it will not affect the function of the system, it has better configuration tolerance, and the preset number of team leaders will be reported to the server monitoring end, and the server monitoring end will be based on the preset group leader. The long number pre-sets multiple servers under the corresponding IP network segment as group leaders, and the remaining servers are set as group members.
在本实施例中,组长还具有与组员相同的行为。In this embodiment, the group leader also has the same behavior as the group members.
在本实施例中,每个IP网段存在多个组长,在一个采集周期(如5分钟)内,任何一个组长能够成功上报组员数据,管理程序就能够获得组员的运行状态,具有很高的可用性。在某个组长不能上送运行状态数据时,该组长被判定失效,同时停止对外发布该组长的信息发布。每个网段的组长的数量可以通过该网段中所有服务器进行自行设定。组员与组长的通信处于同一个IP网段内部,不会受跨网段通信方式和策略的影响,可靠性更高。仅有组长向服务器监测端发送状态数据,更便于访问安全的控制。In this embodiment, each IP network segment has multiple team leaders. Within a collection period (such as 5 minutes), if any team leader can successfully report team member data, the management program can obtain the running status of the team members. Has high availability. When a group leader cannot upload the running status data, the group leader is judged to be invalid, and at the same time, the information release of the group leader is stopped. The number of group leaders in each network segment can be set by all servers in the network segment. The communication between the group members and the group leader is within the same IP network segment, and will not be affected by the communication method and strategy across the network segment, and the reliability is higher. Only the team leader sends status data to the server monitoring terminal, which is more convenient for access security control.
在本实施例中,服务器监测端周期性(如间隔3-4小时)获取各网段组长的IP地址信息并保存在组长IP地址信息表中,该组长IP地址信息表保存了IP网段和组长IP地址的对应关系。同时,接收组长发送的不包括本身运行状态信息的运行状态数据。In this embodiment, the server monitoring end periodically (for example, every 3-4 hours) obtains the IP address information of the group leader of each network segment and saves it in the group leader IP address information table, where the group leader IP address information table stores the IP address information. Correspondence between the network segment and the IP address of the group leader. At the same time, the receiving group leader sends the running status data that does not include its own running status information.
在上述各实施例的基础上,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据,具体包括:On the basis of the above-mentioned embodiments, the running status data is sent to the preset group leader under the same network protocol IP network segment at the first time interval, which specifically includes:
获取对应IP网段的组长IP地址信息表,并基于所述组长IP地址信息表中组长的IP地址,向组长发送运行状态数据。Obtain a group leader IP address information table corresponding to the IP network segment, and send running status data to the group leader based on the group leader's IP address in the group leader IP address information table.
在本实施例中,服务器启动时,自动周期性(如以6-8小时为间隔)向服务器监测端发出查询请求,以获得所在网段的组长的IP地址。服务器启动时中可设置组长数量,默认为3。在同一网段中,应尽量保持所有服务器中该参数的一致性。In this embodiment, when the server is started, it automatically periodically (for example, at intervals of 6-8 hours) sends a query request to the server monitoring end to obtain the IP address of the group leader of the network segment where it is located. The number of group leaders can be set when the server is started, the default is 3. In the same network segment, try to keep this parameter consistent among all servers.
在上述各实施例的基础上,服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,还包括:On the basis of the above-mentioned embodiments, the server monitoring terminal receives the running status data reported by the group leader under each IP network segment at a second interval, and further includes:
基于服务器监测端接收到的各组长的IP地址,更新所述组长IP地址信息表。Based on the IP addresses of the group leaders received by the server monitoring end, the group leader IP address information table is updated.
在本实施例中,为了保证IP地址下的组长数量一致,服务器监测端每进行一次监测后,都需要更新IP网段下的组长信息,保存组长IP地址和接收数据的最近时间,服务器监测端接收到各网段的组长上报的各网段服务器运行状态信息后,更新组长IP地址信息表,即如果当前保存的组长IP地址信息表中包含了上报该数据的组长信息,则更新收到上报数据的时间;如果当前不存在该组长的记录,则新建该组长的记录并保存接收数据时间。In this embodiment, in order to ensure that the number of group leaders under the IP address is consistent, the server monitoring end needs to update the group leader information under the IP network segment after each monitoring, and save the group leader's IP address and the latest time of receiving data. After receiving the server running status information of each network segment reported by the group leader of each network segment, the server monitoring end updates the group leader IP address information table, that is, if the currently saved group leader IP address information table contains the group leader who reported the data information, update the time when the reported data is received; if there is no current record of the group leader, create a new record for the group leader and save the time of receiving the data.
在上述各实施例的基础上,服务器在开启后,还包括:On the basis of the foregoing embodiments, after the server is turned on, the server further includes:
组员获取对应IP网段的组长IP地址信息表,并判断所述组长IP地址信息表中的组长数量是否小于预设组长数量;The group member obtains the group leader IP address information table of the corresponding IP network segment, and judges whether the number of group leaders in the group leader IP address information table is less than the preset number of group leaders;
若是则申请成为组长,并经所述服务器监测端确定是否任命为组长;所述服务器监测端确定组长任命后,更新所述组长IP地址信息表。If so, apply to become the group leader, and the server monitoring terminal determines whether to appoint the group leader; the server monitoring terminal updates the group leader IP address information table after determining the appointment of the group leader.
服务器从服务器监测端获得IP网段所有组长的IP地址,当组长地址数量大于等于预设组长数量时,服务器运行在组员模式;服务器获得的组长IP地址数量少于参数设定的组长数量时,则向服务器监测端申请成为该IP网段的组长,经服务器监测端确认后成为组长,则服务器运行在组长状态。The server obtains the IP addresses of all group leaders in the IP network segment from the server monitoring terminal. When the number of group leader addresses is greater than or equal to the preset number of group leaders, the server runs in group member mode; the number of group leader IP addresses obtained by the server is less than the parameter setting When the number of group leaders is reached, the server will apply to the monitoring terminal of the server to become the group leader of the IP network segment. After being confirmed by the monitoring terminal of the server, it will become the group leader, and the server will run in the group leader state.
在上述各实施例的基础上,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据后,还包括:On the basis of the above embodiments, after sending the running status data to the group leader preset under the same network protocol IP network segment at the first time interval, the method further includes:
组长根据所述运行状态数据建立运行状态表,所述运行状态表用于保存服务器IP地址、信息获取时间和运行状态信息。The team leader establishes an operation state table according to the operation state data, and the operation state table is used to store the server IP address, information acquisition time and operation state information.
在本实施例中,当服务器工作在组员模式时(即设定为组员时),以采集周期为间隔(如5分钟)向本网段所有组长报告本系统的运行状态信息,如连续运行时间等。In this embodiment, when the server works in the group member mode (that is, when it is set as a group member), it reports the running status information of the system to all the group leaders of the network segment at intervals of the collection period (for example, 5 minutes), such as Continuous running time, etc.
当服务器工作在组长模式时(即设定为组长时),除了具有与组员同样的行为外,还建立运行状态表,用于保存组员服务器IP地址、信息获取时间和组员服务器的状态信息,数据格式可以为[IP地址,获取时间,状态信息]。When the server works in the group leader mode (that is, when it is set as the group leader), in addition to having the same behavior as the group members, a running status table is also established to save the IP address of the group member server, the information acquisition time and the group member server. The status information, the data format can be [IP address, acquisition time, status information].
在本实施例中,组长接收本网段所有成员(包括组员和其他组长)发送的运行状态信息,如连续运行时间等,并将信息与接收时间记录在表中对应IP地址位置。如果以前不存在关于该IP地址的记录,则新建记录。In this embodiment, the group leader receives the running status information sent by all members of the network segment (including group members and other group leaders), such as continuous running time, etc., and records the information and the receiving time at the corresponding IP address in the table. If no record exists for the IP address before, a new record is created.
组长以采集周期为间隔查看运行状态表中的信息,清除过期数据(即当前时间减获取时间大于采集周期的数据)后,并将其它数据向服务器监测端报告。The team leader checks the information in the running status table at intervals of the collection period, clears the expired data (that is, the current time minus the data whose acquisition time is greater than the collection period), and reports other data to the server monitoring terminal.
在上述各实施例的基础上,并经所述服务器监测端确定是否任命为组长,具体包括:On the basis of the above embodiments, and the server monitoring terminal determines whether to appoint a team leader, which specifically includes:
服务器监测端接收到组员申请成为组长的请求后,若判断获知所述组长IP地址信息表中的组长数量小于预设组长数量,且所述组长设定数量不超过对应IP网段中组长的最大数量,则将对应组员的IP地址加入到当前的组长IP地址信息表中。After the server monitoring end receives a request from a group member to apply to become a group leader, if it determines that the number of group leaders in the group leader's IP address information table is less than the preset number of group leaders, and the set number of group leaders does not exceed the corresponding IP address If the maximum number of group leaders in the network segment, the IP addresses of the corresponding group members are added to the current group leader IP address information table.
在本实施例中,服务器监测端提供组长任命和查询服务,通过提供组长IP地址查询服务,反馈发送查询请求的IP地址所在网段的所有组长的IP地址;提供组长任命服务,当某个IP地址中的代理程序请求成为组长时,同时提交该IP网段的预设组长数量(默认为3),如果该网段组长数量小于组长设定数量,组长设定数量不超过预设的网段中组长的最大数量(可以设置),则将该IP地址添加到当前的组长IP地址信息表中,并反馈确认信息;否则返回拒绝信息。In this embodiment, the server monitoring end provides group leader appointment and query services. By providing the group leader IP address query service, it feeds back the IP addresses of all group leaders on the network segment where the IP address of the query request is located; provides the group leader appointment service, When an agent in an IP address requests to become a group leader, the preset number of group leaders for the IP network segment (default is 3) is submitted at the same time. If the predetermined number does not exceed the preset maximum number of group leaders in the network segment (which can be set), the IP address will be added to the current group leader IP address information table, and a confirmation message will be fed back; otherwise, a rejection message will be returned.
图2示出了一种服务器运行状态监测装置,基于上述各实施例中的服务器运行状态监测方法,包括代理模块30和服务器监测端40:FIG. 2 shows a server operating state monitoring device, based on the server operating state monitoring methods in the above embodiments, including an
代理模块30使同一网络协议IP网段下的服务器在开启后,每间隔第一时间向预先设置的组长发送运行状态数据;The
服务器监测端40使服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据。The
具体的,在本实施例中,代理模块可以设置在所有服务器中,服务器监测端包括配置控制模块401和管理模块402;Specifically, in this embodiment, the proxy module can be set in all servers, and the server monitoring end includes a
具体的,代理模块30运行在被监控服务器中,可运行在组员状态,也可以运行在组长状态;配置控制模块401用于存储和查询各网段组长信息,管理模块402负责上报数据分析处理。Specifically, the
具体的,在本实施例中,网络中的服务器提前安装有代理模块30,代理模块30在服务器启动时启动运行,自动周期性(如以6-8小时为间隔)向配置控制模块401发出查询请求,以获得所在网段的组长的IP地址。代理模块30启动时中可设置组长数量,默认为3。在同一网段中,应尽量保持所有代理模块30中该参数的一致性。Specifically, in this embodiment, the server in the network is installed with the
具体的,在本实施例中,代理模块30从配置控制模块401获得所有组长的IP地址,当组长地址数量大于等于参数设定的组长数量时,代理模块30运行在组员模式;如果代理模块30获得的组长IP地址数量少于参数设定的组长数量时,则向配置控制模块401申请成为该网段的组长,经配置控制模块401确认后成为组长,则代理模块30运行在组长状态。Specifically, in this embodiment, the
被监控服务器中的代理模块30在与配置控制模块401和管理模块402通信时,不论运行在组长模式还是组员模式,都采用出栈(向外)访问的方式,不会影响在网段边界处定义的入栈访问策略的定义。组员与组长的通信处于同一个IP网段内部,不会受跨网段通信方式和策略的影响,可靠性更高,且仅有组长向管理软件发送状态数据,更便于访问安全的控制。When the
具体的,在本实施例中,当代理模块30工作在组员模式时,以采集周期为间隔(如5分钟)向本网段所有组长报告本系统的运行状态信息,如连续运行时间等。Specifically, in this embodiment, when the
具体的,在本实施例中,当代理模块30工作在组长模式时,除了具有与组员同样的行为外,还建立运行状态表,用于保存组员服务器IP地址、信息获取时间和组员服务器的状态信息,数据格式可以为[IP地址,获取时间,状态信息]。Specifically, in this embodiment, when the
具体的,在本实施例中,组长接收本网段所有成员发送的运行状态信息,如连续运行时间等,并将信息与接收时间记录在表中对应IP地址位置。如果以前不存在关于该IP地址的记录,则新建记录。Specifically, in this embodiment, the group leader receives the running status information, such as continuous running time, etc. sent by all members of the network segment, and records the information and the receiving time at the corresponding IP address position in the table. If no record exists for the IP address before, a new record is created.
具体的,在本实施例中,组长以采集周期为间隔查看运行状态表中的信息,清除过期数据(即当前时间减获取时间大于采集周期的数据)后,并将其它数据向管理模块402报告。Specifically, in this embodiment, the team leader checks the information in the operation status table at intervals of the collection period, clears the expired data (that is, the current time minus the data whose acquisition time is greater than the collection period), and sends other data to the
在本实施例中,配置控制模块401在启动时并周期性(如间隔3-4小时)从管理模块402获取各IP网段组长的IP地址信息并保存在组长IP地址信息表中,该组长IP地址信息表保存了IP网段和组长IP地址的对应关系。同时,配置控制模块401可以接收管理模块402发送的不包括组长运行状态信息的组长信息表。In this embodiment, the
具体的,在本实施例中,配置控制模块401外提供组长IP地址查询服务,反馈发送查询请求的IP地址所在网段的所有组长的IP地址。Specifically, in this embodiment, the
具体的,在本实施例中,配置控制模块401向外提供组长任命服务,当某个IP地址中的代理程序请求成为组长时,同时提交该网段的组长设定数量(默认为3),如果该网段组长数量小于组长设定数量,组长设定数量不超过预设的网段中组长的最大数量,则将该IP地址添加到当前的组长IP地址表中,并反馈确认信息;否则返回拒绝信息。Specifically, in this embodiment, the
在本实施例中,管理模块402允许各网段的组长发起的访问。管理模块402建立运行状态表,格式与组长使用的运行状态表相同,保存网络中所有服务器的运行状态信息;建立组长信息表,保存组长IP和接收数据的最近时间。In this embodiment, the
管理模块402接收到各网段的组长上报的各网段服务器运行状态信息后,更新组长信息表,即如果当前管理模块402保存的组长信息表中包含了上报该数据的组长信息,则更新收到上报数据的时间;如果当前不存在该组长的记录,则新建该组长的记录并保存接收数据时间。After the
同时,管理模块402将收到的各网络服务器其运行状态信息与当前保存的运行状态信息进行比较,以发现运行状态的变化。能够进行的分析判断的内容与收集的运行状态信息的种类相关。At the same time, the
例如:以服务器持续运行时间作为运行状态数据之一,当发现新收到的持续运行时间小于1-2个采集周期时,说明该服务器刚刚重新启动,可以给出告警信息;当发现持续运行时间与原有数据的差大于1-2个采集周期,则说明该IP地址可能变更到其它服务器,或该服务器的网络曾出现过不稳定(配合采集时间分析,能够得到更准确结果),可以给出告警。For example: take the continuous running time of the server as one of the running status data, when it is found that the newly received continuous running time is less than 1-2 collection cycles, it means that the server has just restarted, and alarm information can be given; when the continuous running time is found If the difference from the original data is greater than 1-2 collection cycles, it means that the IP address may be changed to another server, or the network of the server has been unstable (with the analysis of collection time, more accurate results can be obtained). alarm.
具体的,在本实施例中,在完成数据对比分析后,管理模块402将收到的新的运行状态信息和采集时间信息写入运行状态表,如果以前不存在该组员的信息,则新建并保存运行状态和获取时间信息。Specifically, in this embodiment, after completing the data comparison and analysis, the
具体的,在本实施例中,管理模块402以一个较短的时间(如以1分钟)为间隔扫描运行状态信息表,当发现某个IP的采集时间是n个采集周期之前时,说明该服务器在这段时间内没有向该网段的组长发送状态信息,可以给出告警。Specifically, in this embodiment, the
具体的,在本实施例中,管理模块402周期性(如以5分钟为间隔)扫描组长IP地址信息表,当发现组长超过n个周期没有提交状态时,将该组长的ID地址删除,并将更新后的组长IP地址信息表中各网段的组长IP地址信息传输给配置控制模块401。Specifically, in this embodiment, the
图3为本发明实施例提供的电子设备的实体结构示意图,如图3所示,该电子设备可以包括:处理器(processor)810、通信接口(Communications Interface)820、存储器(memory)830和通信总线840,其中,处理器810,通信接口820,存储器830通过通信总线840完成相互间的通信。处理器810可以调用存储在存储器830上并可在处理器810上运行的计算机程序,以执行上述各实施例提供的服务器运行状态监测方法,例如包括:FIG. 3 is a schematic diagram of an entity structure of an electronic device provided by an embodiment of the present invention. As shown in FIG. 3 , the electronic device may include: a processor (processor) 810, a communications interface (Communications Interface) 820, a memory (memory) 830, and a communication The
S1、服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;S1. After the server is turned on, it sends the running status data to the group leader preset under the same network protocol IP network segment at the first time interval;
S2、服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。S2. The server monitoring terminal receives the running status data reported by the group leader under each IP network segment at a second interval, and monitors the running status of each server according to the running status data.
此外,上述的存储器830中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the
本发明实施例还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各实施例提供的服务器运行状态监测方法,例如包括:Embodiments of the present invention further provide a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, is implemented to execute the server running state monitoring method provided by the above embodiments, for example, including:
S1、服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;S1. After the server is turned on, it sends the running status data to the group leader preset under the same network protocol IP network segment at the first time interval;
S2、服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。S2. The server monitoring terminal receives the running status data reported by the group leader under each IP network segment at a second interval, and monitors the running status of each server according to the running status data.
本发明实施例还提供本实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行如上述的服务器运行状态监测方法,例如包括:An embodiment of the present invention also provides a computer program product disclosed in this embodiment, where the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions When executed by the computer, the computer can execute the above-mentioned method for monitoring the running state of the server, for example, including:
S1、服务器在开启后,每间隔第一时间向同一网络协议IP网段下预先设置的组长发送运行状态数据;S1. After the server is turned on, it sends the running status data to the group leader preset under the same network protocol IP network segment at the first time interval;
S2、服务器监测端每间隔第二时间接收各IP网段下组长上报的运行状态数据,并根据所述运行状态数据监测各服务器的运行状态。S2. The server monitoring terminal receives the running status data reported by the group leader under each IP network segment at a second interval, and monitors the running status of each server according to the running status data.
综上所述,本发明实施例提供的一种服务器运行状态监测方法和装置,利用同网段的组长收集本网段的中各服务器运行状态数据,没有跨网段传输,数据传输范围小,更加可靠;每个网段的组长的数量可以通过该网段中所有服务器进行设定,与配置控制软件和管理软件无关,网段管理人员可以进行自主管理,具有良好的个性化配置能力;使同一网段的各服务器设置的组长数量不一致也不会影响系统的功能,具有较好的配置宽容度;组员的状态数据会经过多个组长进行上报,只需任何一个组长上报数据成功,就可以获知该组员的运行状态信息,具有很高的系统可用性。To sum up, the embodiments of the present invention provide a method and device for monitoring the running state of a server. The team leader of the same network segment is used to collect the running state data of each server in the network segment, without cross-network segment transmission, and the data transmission range is small. , more reliable; the number of group leaders of each network segment can be set through all servers in the network segment, independent of configuration control software and management software, network segment managers can conduct independent management, and have good personalized configuration capabilities ;If the number of group leaders set by each server on the same network segment is inconsistent, it will not affect the function of the system, and it has a good configuration latitude; the status data of group members will be reported by multiple group leaders, and only one group leader is required. If the data is reported successfully, you can know the running status information of the group member, which has high system availability.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811475886.XA CN111274081A (en) | 2018-12-04 | 2018-12-04 | A method and device for monitoring the running state of a server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811475886.XA CN111274081A (en) | 2018-12-04 | 2018-12-04 | A method and device for monitoring the running state of a server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111274081A true CN111274081A (en) | 2020-06-12 |
Family
ID=71003152
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811475886.XA Pending CN111274081A (en) | 2018-12-04 | 2018-12-04 | A method and device for monitoring the running state of a server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111274081A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007249373A (en) * | 2006-03-14 | 2007-09-27 | Osaka Prefecture Univ | Distributed program monitoring system |
CN101098260A (en) * | 2006-06-29 | 2008-01-02 | 国际商业机器公司 | Distributed equipment monitor management method, equipment and system |
CN102739435A (en) * | 2011-03-31 | 2012-10-17 | 微软公司 | Fault detection and recovery as service |
CN104104723A (en) * | 2014-07-19 | 2014-10-15 | 福州大学 | Distributed collaboration monitoring system |
CN105141449A (en) * | 2015-07-28 | 2015-12-09 | 中标软件有限公司 | Addition method and device for monitoring configuration |
CN105450686A (en) * | 2014-08-19 | 2016-03-30 | Tcl集团股份有限公司 | Method and device for establishing server cluster |
CN107612770A (en) * | 2017-09-07 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of monitor node management method and device |
-
2018
- 2018-12-04 CN CN201811475886.XA patent/CN111274081A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007249373A (en) * | 2006-03-14 | 2007-09-27 | Osaka Prefecture Univ | Distributed program monitoring system |
CN101098260A (en) * | 2006-06-29 | 2008-01-02 | 国际商业机器公司 | Distributed equipment monitor management method, equipment and system |
CN102739435A (en) * | 2011-03-31 | 2012-10-17 | 微软公司 | Fault detection and recovery as service |
CN104104723A (en) * | 2014-07-19 | 2014-10-15 | 福州大学 | Distributed collaboration monitoring system |
CN105450686A (en) * | 2014-08-19 | 2016-03-30 | Tcl集团股份有限公司 | Method and device for establishing server cluster |
CN105141449A (en) * | 2015-07-28 | 2015-12-09 | 中标软件有限公司 | Addition method and device for monitoring configuration |
CN107612770A (en) * | 2017-09-07 | 2018-01-19 | 郑州云海信息技术有限公司 | A kind of monitor node management method and device |
Non-Patent Citations (1)
Title |
---|
LIYANG: "zabbix监控(三)", pages 1, Retrieved from the Internet <URL:https://blog.leonshadow.cn/763482/1006.html> * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11509526B2 (en) | Distributed cloud agents for managing cloud services | |
Ramesh et al. | The smart network management automation algorithm for administration of reliable 5G communication networks | |
CN110830283B (en) | Fault detection method, device, equipment and system | |
US20040008727A1 (en) | Network resource management in a network device | |
CN104935634B (en) | Mobile device data sharing method based on Distributed shared memory | |
CN105556499A (en) | Intelligent auto-scaling | |
JP2012507797A (en) | Scalable performance management system | |
CN106411629B (en) | Method and equipment for monitoring state of CDN node | |
CN106993043B (en) | Data communication system and method based on agency | |
CN113835836B (en) | System, method, computer device and medium for dynamic publishing container service | |
CN114900449A (en) | Resource information management method, system and device | |
CN112817828A (en) | GTP monitoring method, device and equipment | |
EP3026860B1 (en) | Method and system for transmission management of full configuration synchronization between eml-nml | |
CN114553867A (en) | Cloud-native cross-cloud network monitoring method and device and storage medium | |
CN103957127B (en) | Heterogeneous Vendor Transmission Network Interface Adaptation Method | |
CN111274081A (en) | A method and device for monitoring the running state of a server | |
CN112437146B (en) | A device state synchronization method, device and system | |
CN102780570A (en) | Achieving method and system for management of cloud computing devices | |
CN116346834A (en) | Session synchronization method, device, computing equipment and computer storage medium | |
CN115114243A (en) | Log centralized storage method and device, electronic equipment and storage medium | |
US9172596B2 (en) | Cross-network listening agent for network entity monitoring | |
US20060026278A1 (en) | Administration system for network management systems | |
CN114050960A (en) | Distributed server cluster node management method and device | |
CN115208799B (en) | Heartbeat management method, device and storage medium | |
CN114064257B (en) | Storage service management method, device and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200612 |
|
RJ01 | Rejection of invention patent application after publication |