CN108234170A - The monitoring method and device of a kind of server cluster - Google Patents

The monitoring method and device of a kind of server cluster Download PDF

Info

Publication number
CN108234170A
CN108234170A CN201611161638.9A CN201611161638A CN108234170A CN 108234170 A CN108234170 A CN 108234170A CN 201611161638 A CN201611161638 A CN 201611161638A CN 108234170 A CN108234170 A CN 108234170A
Authority
CN
China
Prior art keywords
node
management node
server cluster
management
collection result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611161638.9A
Other languages
Chinese (zh)
Other versions
CN108234170B (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 Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software 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 Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN201611161638.9A priority Critical patent/CN108234170B/en
Publication of CN108234170A publication Critical patent/CN108234170A/en
Application granted granted Critical
Publication of CN108234170B publication Critical patent/CN108234170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Abstract

The invention discloses a kind of server cluster monitoring methods and device, this method to include:It establishes and connects with the management node in server cluster, and obtain the running state data of the management node;When getting the collection result that each management node returns, determine that the operating status of server cluster is normal;When the collection result that the management node has not been obtained, determine that the operating status of server cluster is abnormal, and carries out alarming processing.The monitoring method and device of server cluster through this embodiment, the server cluster for deploying management node for one group a kind of state by management node is provided judge cluster service whether formal approaches, and it does not need to manually perform order on the server, achieve the purpose that monitor automatically, monitoring efficiency is improved, meets the application demand of enterprise.

Description

The monitoring method and device of a kind of server cluster
Technical field
The present invention relates to field of computer technology, and in particular to the monitoring method and device of a kind of server cluster.
Background technology
Redis is key-value data structure storage systems in a kind of memory increased income, it may be used as database, delays It deposits and message-oriented middleware.It supports a plurality of types of data structures, such as character string (strings), hashes (hashes), list (lists), gather (sets), ordered set (sorted sets).For guaranteed efficiency, data all Redis are all placed on interior In depositing, newer data periodically can be written disk or modification is operated the additional record file of write-in by Redis.
Redis server clusters are that Redis is disposed in multiple servers, and Redis server clusters are server-side fragments Key assignments is reasonably allocated to according to certain algorithm on each Redis examples fragment by the embodiment of technology, while each example is assisted It adjusts, externally undertakes consistent service jointly.For client, entire cluster is regarded as an entirety, and client can connect Any one node is operated.Redis also supports that principal and subordinate (master-slave) is synchronous, data in order to avoid Single Point of Faliure It can be synchronized from node from host node to any number of.
Need to be monitored Redis clusters in practical application, for example, obtain cpu usage, memory service condition and The data such as client connection.One of existing monitoring means are that Redis clothes are manually entered on the server for be deployed with Redis It is engaged in the info orders provided and performing the various information and statistic that can return to a Redis node after the order, so as to reach To the purpose of one Redis node of monitoring.
The defects of prior art is:It needs to be manually entered the fortune that info orders obtain Redis nodes in Redis servers Row state, monitoring efficiency is low, and can not meet automatic monitoring and the needs of continuously monitoring.
Invention content
The present invention provides the monitoring method and device of a kind of server cluster, with solve prior art monitoring efficiency it is low and The problem of automatic monitoring and continuous monitoring demand can not be met.
According to an aspect of the invention, there is provided a kind of monitoring method of server cluster, monitoring method include:
It establishes and connects with the management node in server cluster, and obtain the running state data of the management node;
Judge whether to get the collection result of each management node, returned when getting each management node Collection result when, determine that the operating status of server cluster is normal, when the collection result that the management node has not been obtained, Determine that the operating status of server cluster is abnormal, and carries out alarming processing.
According to another aspect of the present invention, a kind of monitoring device of server cluster is provided, which includes:
Connection establishment unit connects for being established with the management node in server cluster;
Data capture unit, for obtaining the running state data of the management node;
Status determining unit, for when getting the collection result that each management node returns, determining server The operating status of cluster is normal;When the collection result that the management node has not been obtained, the operation shape of server cluster is determined State is abnormal, and carries out alarming processing.
The beneficial effects of the invention are as follows:The monitoring method of this server cluster of the embodiment of the present invention and device by with Management node in server cluster establishes connection, and obtains the running state data of management node according to judging whether to get The collection result of each management node determines the operating status of server cluster, when the acquisition for getting each management node return It when as a result, determines that the operating status of server cluster is normal, when the collection result that management node has not been obtained, determines server The operating status of cluster is abnormal, and carries out alarming processing.In this way, in the server cluster for being deployed with management node, by with Management node establishes connection, and the running state data for obtaining management node can reach automatically and continuously monitoring server cluster Purpose improves monitoring efficiency, ensure that the accuracy of collection result, meets the application demand of enterprise, convenient to push away on a large scale Wide application.
Description of the drawings
Fig. 1 is a kind of flow diagram of the monitoring method of server cluster of one embodiment of the invention;
Fig. 2 is a kind of structure chart of server cluster of one embodiment of the invention;
A kind of server cluster condition adjudgement logical schematic of Fig. 3 one embodiment of the invention;
Fig. 4 is a kind of server cluster interior joint running state data acquisition logic signal of one embodiment of the invention Figure;
Fig. 5 is a kind of schematic diagram of the index value display interface of server cluster interior joint of one embodiment of the invention;
Fig. 6 is a kind of structure diagram of the monitoring device of server cluster of one embodiment of the invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
Embodiment one
Fig. 1 is a kind of flow diagram of the monitoring method of server cluster of one embodiment of the invention, referring to Fig. 1, The method of server cluster monitoring includes the following steps:
Step S101 is established with the management node in server cluster and is connected, and obtains the operation shape of the management node State data;Here server cluster can be Redis server clusters.
Step S102 judges whether to get the collection result of each management node, be returned when getting each management node During the collection result returned, determine that the operating status of server cluster is normal, when the collection result that management node has not been obtained, really The operating status for determining server cluster is abnormal, and carries out alarming processing.
Method as shown in Figure 1 is it is found that the method for this server cluster monitoring of the embodiment of the present invention, is deploying pipe In the server cluster for managing node, connected by being established with management node, and obtain the running state data of management node, according to The collection result (that is, running state data of management node) that management node return whether can be received determines server cluster Operating status.Each node in server cluster is needed to be manually entered querying command with the prior art to realize the mode of monitoring It compares, the present embodiment performs acquisition operations, and whether return to acquisition according to management node after only need to establishing connection with management node As a result can determine that the operating status of server cluster, scheme realize it is simple, and can real-time report node monitor control index and State achievees the purpose that automatically and successively monitoring server cluster, meets the application demand of enterprise.
The embodiment of the present invention is mainly used in the monitoring of Redis server clusters, and one or more can be used in practice Redis sentry (Sentinel), Redis host node (Master) and it is multiple from node (Slave) form a cluster. Sentinel constantly detect Redis host node Master and from node Slave whether normal operation, and saved in Master When point breaks down, Sentinel starts an automatic fault migration operation, by the one of Slave of Master connections that fails Upgrade to new Master, and other Slave of failure Master connections is allowed to be changed to replicate new Master, as old Master It rejoins after the cluster of Sentinel, the Slave as new Master is configured.Sentinel based on Redis as a result, The High Availabitity management function of Redis clusters can be achieved.
The realization of prior art Redis cluster monitorings is by performing info order (info orders on Redis servers It is a kind of commonly used command of Redis, info orders are returned with a kind of form that should be readily appreciated that and read about Redis servers Various information and statistic) obtain the result information that current Redis nodes return.It is obvious that this monitor mode needs User's manual input commands, and the result information returned is readable poor, not intuitively, and cannot reach automatic monitoring server The purpose of cluster.And put into practice in enterprise demand be can periodically, the data of continual each nodes of automatic collection Redis letter Breath, the monitor control index and state and the service status information of Redis clusters of real-time report Redis nodes.
For this purpose, the Sentinel present embodiments provided in a kind of cluster based on Redis realizes the scheme of cluster monitoring, it is real The purpose of automatic, continuous monitoring Redis server clusters is showed.
Embodiment two
Fig. 2 is a kind of structure chart of server cluster of one embodiment of the invention, the one of Fig. 3 one embodiment of the invention Kind server cluster condition adjudgement logical schematic, below in conjunction with Fig. 2 and Fig. 3 to a kind of server of one embodiment of the invention The realization process of the monitoring method of cluster is described in detail.
Redis aggregated structures for convenience of explanation carry out the peace of Redis clusters in the present embodiment on three servers Dress, wherein, Master nodes and/or Slave nodes are disposed on every server.As shown in Fig. 2, distinguish in three IP address For:192.168.180.60 Master nodes are disposed on the server of 192.168.180.61 and 192.168.180.62 respectively And/or Slave nodes.For example, it is in IP address:192.168.180.60 server on dispose two Slave nodes (one The IP address of Slave nodes and port are respectively:192.168.180.60:56379, the IP address of another Slave node and Port is respectively 192.168.180.60:56380).
Also, a Sentinel node is disposed in every server, for example, being 192.168.180.60 in IP address Server in deployment IP address and port numbers be respectively:192.168.180.60:56378 Sentinel nodes.
It delays unavailable problem caused by machine in view of equipment, it is preferable that Master nodes and Slave in different server Node forms principal and subordinate (Master/Slave) relationship.In addition, the Sentinel node disposed on every server, as The management node of Redis clusters for monitoring the activestandby state of Master and Slave and switching in real time, ensures when Master institutes Server delay machine when, Slave, which can also continue to take over Master, to work on.
Referring to Fig. 2, each Slave nodes are directed toward the Master nodes of connection by line segment with the arrow.For example, exist (IP address and port numbers are respectively for the Slave nodes disposed in the server that IP address is 192.168.180.60: 192.168.180.60:56379) connection is the Master nodes disposed in IP address is 192.168.180.62 server (IP address and port numbers of Master nodes be respectively:192.168.180.62:56380).
Redis server clusters shown in Fig. 2 are monitored using the monitoring method of the server cluster of the present embodiment Specific implementation it is as follows:
First, monitoring programme is installed on the client, the monitoring programme in the present embodiment is developed using Java language, Development kit jedis-2.7.2.jar is quoted in Java Development Engineerings, carries out code development.
After installation is complete, Redis nodes are directly connected to using java applet and obtain info information.
The key code for connecting a Redis node is as follows:
Jedis jedis=new Jedis (" 192.168.180.61 ", 56378);
String info=jedis.info ();
It is 192.168.180.61 that above-mentioned code, which illustrates one IP address of connection, and the Redis that port numbers are 56378 is saved Point.
If the Redis node normal operations that above-mentioned IP and port numbers parameter limit can be returned from Redis nodes The relevant information of the node is obtained in info character strings.
For example, the info information returned after being acquired by above-mentioned code to a Sentinel node is as follows:
#Sentinel
sentinel_masters:3
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:Name=common,
Status=ok, address=192.168.95.111:56379, slaves=1, sentinels=3
master1:Name=resource1, status=ok, address=192.168.95.112:56379, Slaves=1, sentinels=3
master2:Name=resource2, status=ok, address=192.168.95.113:56379, Slaves=1, sentinels=3
By return information it can be seen that this Sentinel has managed 3 Master at present, and is set forth Master's IP and port, respectively there are one Slave for connection by each Master.
As a result, in the present embodiment by client be directly connected to Redis nodes obtain info information, realize with By the advantageous effect that the info information of info orders acquisition node is identical on Redis servers, and it is manual not need to user Info orders are inputted, monitoring efficiency is improved, has achieved the purpose that automatic monitoring server node.
Sentinel nodes pass through above-mentioned key code and clothes as the management node in Redis clusters in the present embodiment The Sentinel nodes being engaged in device cluster establish connection, and obtain the running state data of management node, if can get every The collection result of a management node illustrates that the operating status of server cluster is normal, if some or certain pipes cannot be got When managing the collection result of node, illustrate that the operating status of server cluster is abnormal, then can carry out alarming processing.
It will be understood by those skilled in the art that multiple Redis nodes are deployed in the Redis clusters of the present embodiment, such as Including multiple Master, Slave and Sentinel nodes (as shown in Figure 2), and each node is managed by Sentinel Operating status.Since Sentinel can monitor operating status and the role of managed Master or Slave nodes, so can The operating status of a Redis cluster service is judged by Sentinel.
The realization logic for judging Redis service states by Sentinel nodes in the present embodiment is:If Redis is serviced All Sentinel nodes can not return to info information in device cluster, then it is assumed that and this Redis service state is abnormal, and Redis is reported to service unavailable alarm.
Monitoring method in the present embodiment checks management node all in server cluster by periodicity, Determine whether to receive the collection result that each management node returns.Such as it is checked in a Redis service by polling mode The IP address and port numbers of all Sentinel, each Sentinel nodes returns the result not in being serviced according to a Redis Corresponding warning operation is carried out with situation.
Specifically, as shown in figure 3, monitoring flow start after, first with Redis service in all Sentinel nodes establish Connection, the info information for acquiring Sentinel nodes are (as shown in Figure 3:Adopt Sentinel192.168.180.60:56378).
It should be noted that the quantity of Sentinel nodes shown in Fig. 3 is three, in the other embodiment of the present invention In, the quantity of Sentinel nodes can be more than or less than three, should service practical application request according to Redis and determine The quantity of Sentinel nodes, the present embodiment are not restricted the quantity of Sentinel nodes.In addition, it is being acquired in the present embodiment The unique mark of one or more Sentinel nodes is previously obtained before beginning, for example, being previously obtained the IP of Sentinel nodes Address and port numbers.
Then, for each Sentinel nodes, judge that it returns to the situation of info information;
For example, it is respectively 192.168.180.60 for IP address and port numbers:56378 Sentinel nodes judge It is no to get info information.
(1) after the IP and port test of all Sentinel in servicing a Redis, if the Redis The IP of each Sentinel in service and port cannot return to info information, then it is assumed that this Redis services are abnormal can not With, and upload the extremely not available alarm of Redis service states.
That is, shown in Fig. 3, when three Sentinel nodes cannot get info information as logic and the relationship of (AND), It determines Redis service states exception, and carries out alarming processing.
(2) when determining to have not been obtained the collection result that some Sentinel node returns in server cluster, by this The status indication of Sentinel nodes is exception and carries out alarming processing.
That is, shown in Fig. 3, when three Sentinel nodes cannot get info information as logic or the relationship of (OR), The status indication of the single Sentinel nodes of info information will cannot be returned to be abnormal, and upload the Sentinel node states Abnormal alarm.
(3) it when the IP and port that check all Sentinel nodes can be adopted, when can return to info information, determines Redis services are normal, upload the prompt message of Redis services normal (or restoring normal).
That is, shown in Fig. 3, when three Sentinel nodes can get info information as logic and the relationship of (AND), really It is normal to determine Redis service states.
So far, a kind of technology that monitoring Redis server clusters are realized based on Sentinel nodes is present embodiments provided Scheme improves the monitoring efficiency of Redis services, saves manpower, and realize automatically by the monitoring programme of client , it is successional monitoring Redis service advantageous effect, do not need to user and be manually entered info orders, meet enterprise answer Use demand.
Embodiment three
Present embodiments provide a kind of acquisition logic of each node in Redis clusters.Specifically, by acquiring Sentinel Node can collect the information of the Master nodes of Sentinel node administrations.That is, Sentinel node is determined In the case of IP address and port, the info information of this Sentinel node is first adopted, can obtain this Sentinel management , there are IP address and the port of multiple Master nodes in the corresponding IP address of multiple Master nodes and port, recycle these IP address and port carry out next step acquisition.
The Master nodes of each Sentinel node administrations and the connection of Master nodes are pre-configured in the present embodiment Slave nodes, to realize that the info for completing by least one Sentinel nodes each node in entire Redis clusters believes Cease the effect of acquisition.
Fig. 4 is a kind of server cluster interior joint running state data acquisition logic signal of one embodiment of the invention Figure referring to Fig. 4, in the present embodiment, first adopts the info information of a Sentinel node, the IP address of the Sentinel nodes and Port numbers are respectively:192.168.180.60:56378.
Note:The specific implementation of acquisition Sentinel nodes can be found in the key code illustrated in embodiment two.
As shown in figure 4, the info message parts that Sentinel nodes return are schematically as follows:
sentinel_masters:3
master0:Status=ok, address=192.168.180.62:56379, slaves=1
master1:Status=ok, address=192.168.180.62:56380, slaves=1
master2:Status=ok, address=192.168.180.61:56379, slaves=1
Then, according to interdependent node in the collection result acquisition server cluster of management node Sentinel returns (here Interdependent node be relevant host node and from node) running state data.
Specifically, the operating status number of interdependent node in server cluster is obtained according to the collection result that management node returns According to including:The collection result data returned according to management node determine that the unique mark of the host node of the management node management is believed Breath, and according to the unique mark for the host node determined, obtain the running state data of host node;It is adopted according to what host node returned Collection result determines the unique mark of the slave node of host node connection, and according to the unique mark of slave node determined, obtains Take the running state data from node.
As shown in figure 4, after obtaining the info information that a Sentinel node returns, it is known that, the Sentinel node pipes Three Master nodes are managed, respectively:master0:Address=192.168.180.62:56379, master1: Address=192.168.180.62:5638,master2:Address=192.168.180.61:56379.
Then, the address for being utilized respectively three Master nodes acquires the info information of these three Master nodes. Note:The specific implementation of three Master nodes can be found in the key code illustrated in embodiment two.As shown in figure 4, it can obtain The info information returned to each Master nodes.
For example, acquisition address is 192.168.180.61:Info information that 56379 Master nodes return it is found that The quantity of the Slave nodes of Master nodes connection is one, and the IP address of the Slave nodes are 192.168.180.61 port numbers 56380.
Finally, according to the IP address and port numbers of Slave nodes, the acquisition of the info information of the Slave nodes is completed.
So far, the method for the server cluster monitoring of the present embodiment, by acquiring Sentinel nodes, can obtain The information of the Master nodes of Sentinel node administrations.Such as acquisition one Sentinel node, obtain it is current this The IP address and port numbers of three Master of Sentinel management, then the IP of these three Master and the letter of port are acquired successively Breath, obtains the unique identification information of the Slave nodes of the Master.In this way at least through the IP of Sentinel node and end Mouthful, it just can be the information collections of all Master and Slave nodes in entire cluster service to (including this Sentinel sections Put the info information of itself).
Example IV
Since the info information that Redis nodes return is machine language, in order to improve the readable of Redis node related informations Property, make collection result more intuitive, the method for the server cluster monitoring of the present embodiment is further included at the data to collection result Manage step.
In the present embodiment, the collection result returned to management node and/or interdependent node carries out data processing.
Specifically, data handling procedure is:Instruction should in the collection result that extract management node and/or interdependent node return The configuration information of node or the key message of performance information, using the corresponding numerical value of key message as management node and/or correlation The key index value of node.
Then, the result after data processing is saved in monitoring data library.Specifically, respectively with management node and/or The combination of the IP address and port numbers of interdependent node establishes the unique mark and node of node as the corresponding unique mark of node Key index value between correspondence, which is saved in monitoring data library.
Finally, the method for the present embodiment further includes:Monitoring data library is searched according to the unique mark of node input by user, Obtain the corresponding key index value of unique mark of the node;It is defeated according to being shown after the corresponding display interface of key index value generation Go out.
In the present embodiment, pass through the info information in each Redis nodes (info information is the fixed character string of form) The corresponding CPU use informations of middle lookup key message, key message here, such as the node and memory occupation information.So The corresponding numerical value of extraction key message afterwards, by the numerical value as the resource distribution of Redis nodes or the key index value of performance.
For example, the field information of memory part is as follows in the info information of a Redis node:
used_memory:The memory that 4809536 #Redis are used
used_memory_peak:The peak value of memory used in 6589592 #Redis
What the two fields represented is the byte number of the amount of ram that this current Redis node uses and peak value.
In the present embodiment, to the used_memory in collection result info information:4809536 carry out numerical value extraction, obtain The numerical value of currently used amount of ram:4809536.
Then, by the combination of the IP address of the Redis nodes and port numbers (for example, Redis-192.168.180.61- 56379) as the unique mark of the Redis nodes, pair of the two key index values and the unique mark of Redis nodes is established It should be related to, then this correspondence is saved in monitoring data library.In this way, by by key index value and Redis nodes Unique mark correspondence be stored to monitoring data library, subsequently when the collection result for receiving user checks request, packet can be generated The display interface of the value containing key index facilitates user by showing that key index value is checked at interface.
Fig. 5 is a kind of schematic diagram of the index value display interface of server cluster interior joint of one embodiment of the invention, Referring to Fig. 5, it is shown that the display interface of the current memory usage amount (4.95MB) of a Redis node, in the display interface It shows a display box, currently used memory printed words, date (xxxx) information and temporal information is shown in display box (21:21:37), and current memory usage amount is shown, in this way, showing the current interior of Redis nodes with patterned way Usage amount is deposited, makes Redis node collection results more intuitive, improves the readability of collection result, user is facilitated to understand Redis sections Key index in the info information that point returns, reduces the professional requirement to user.
Embodiment five
Fig. 6 is a kind of structure diagram of the monitoring device of server cluster of one embodiment of the invention, should referring to Fig. 6 The monitoring device 60 of server cluster includes:
Connection establishment unit 601 connects for being established with the management node in server cluster;
Data capture unit 602, for obtaining the running state data of the management node;
Status determining unit 603, for when getting the collection result that each management node returns, determining server set The operating status of group is normal;When the collection result that management node has not been obtained, determine that the operating status of server cluster is abnormal, And carry out alarming processing.
In one embodiment of the invention, data capture unit 602 further includes:Interdependent node data acquisition subelement, Collection result for being returned according to management node obtains the running state data of interdependent node in server cluster;
The device 60 further includes:Gathered data processing unit, for the collection result to management node and/or interdependent node It carries out data processing and the result after data processing is saved in monitoring data library, interdependent node includes the management node management Host node and the host node connection slave node.
In one embodiment of the invention, the acquisition knot that interdependent node data acquisition subelement is returned according to management node Fruit data determine the unique identification information of the host node of the management node management, and according to the unique mark for the host node determined Know, obtain the running state data of host node;The collection result returned according to the host node determines what the host node connected From the unique mark of node, and according to the unique mark of slave node determined, obtain the running state data from node;Acquisition Data processing unit, indicate in the collection result returned for extract management node and/or interdependent node the node with confidence The key message of breath or performance information, refers to using the corresponding numerical value of key message as the key of management node and/or interdependent node Scale value;And for respectively using the combination of the IP address and port numbers of management node and/or interdependent node as the unique of node Mark, establishes the correspondence between the unique mark of node and the key index value of node, which is saved in prison It controls in database.
In one embodiment of the invention, which further includes:Display output unit, for according to input by user The unique mark of node searches monitoring data library, obtains the corresponding key index value of unique mark of the node, is referred to according to key Scale value shows output after generating corresponding display interface.
In one embodiment of the invention, status determining unit 603 are additionally operable to periodically to owning in server cluster Management node checked, it is determined whether the collection result that each management node returns is received, when determining that service has not been obtained During the collection result that some management node returns in device cluster, the status indication of the management node for exception and is carried out at alarm Reason;
When the collection result for determining to have not been obtained management node all in server cluster, by the server cluster Status indication is exception and carries out servicing unavailable alarming processing.
It should be noted that the course of work of this server cluster monitoring device of the present embodiment is and aforementioned server The realization step of cluster monitoring method is corresponding, therefore, the more detailed work of the server cluster monitoring device of the present embodiment It may refer to the explanation of aforementioned server cluster monitoring embodiment of the method as process, details are not described herein.
In conclusion the monitoring method and device of this server cluster of the embodiment of the present invention, by being serviced with Redis Management node Sentinel in device cluster establishes connection, and obtains the running state data of management node Sentinel according to sentencing The disconnected collection result for whether getting each management node Sentinel determines the operating status of Redis server clusters, when obtaining When getting the collection result that each management node Sentinel is returned, determine that the operating status of Redis server clusters is normal, when When the collection result of some or certain management node Sentinel has not been obtained, the operating status of Redis server clusters is determined It is abnormal, and carry out alarming processing.In this way, in the Redis server clusters for being deployed with Sentinel management nodes, realizing can It, just can be primary by a Sentinel node depending on the real time monitoring Redis cluster interior joint information of change and service operating status Property acquisition find the Sentinel node administrations all Redis nodes information.Sentinel nodes are deployed for one group Redis clusters determine that one kind judges the whether normal automatic monitoring scheme of cluster service by multiple Sentinel, improve Monitoring efficiency meets the application demand of enterprise, facilitates large-scale promotion application.
The above description is merely a specific embodiment, under the above-mentioned introduction of the present invention, those skilled in the art Other improvement or deformation can be carried out on the basis of above-described embodiment.It will be understood by those skilled in the art that above-mentioned tool The purpose of the present invention is only preferably explained in body description, and protection scope of the present invention is subject to the protection scope in claims.

Claims (10)

1. a kind of monitoring method of server cluster, which is characterized in that the monitoring method includes:
It establishes and connects with the management node in server cluster, and obtain the running state data of the management node;
Judge whether to get the collection result of each management node, when get that each management node returns adopts When collecting result, determine that the operating status of server cluster is normal;When the collection result that the management node has not been obtained, determine The operating status of server cluster is abnormal, and carries out alarming processing.
2. according to the method described in claim 1, it is characterized in that, this method further includes:
The running state data of interdependent node in server cluster is obtained according to the collection result that management node returns,
It is saved in monitoring data library after carrying out data processing to the collection result of management node and/or interdependent node.
3. according to the method described in claim 2, it is characterized in that, the interdependent node includes the main section of the management node management Point and the slave node of host node connection, the collection result returned according to management node obtain phase in server cluster The running state data of artis includes:
The collection result data returned according to the management node determine the unique mark of the host node of the management node management Information, and according to the unique mark for the host node determined, obtain the running state data of host node;It is returned according to the host node The collection result returned determines the unique mark of the slave node of host node connection, and according to the unique mark for the slave node determined Know, obtain the running state data from node.
4. according to the method described in claim 2, it is characterized in that, described adopt management node and/or interdependent node return Collection result carries out data processing and includes:
The configuration information or performance information of the node are indicated in the collection result that extract management node and/or interdependent node return Key message, using the corresponding numerical value of the key message as management node and/or the key index value of interdependent node.
5. according to the method described in claim 4, it is characterized in that, the monitoring data library that is saved in includes:
It is established respectively using the combination of the IP address and port numbers of management node and/or interdependent node as the unique mark of node The correspondence is saved in monitoring data library by the correspondence between the unique mark of node and the key index value of node In.
6. according to the method described in claim 4, it is characterized in that, this method further includes:According to node input by user only Monitoring data library described in one identifier lookup obtains the corresponding key index value of unique mark of the node;
Output is shown after generating corresponding display interface according to the key index value.
7. according to the method described in claim 1, it is characterized in that, this method further includes:
Periodically management node all in the server cluster is checked, it is determined whether get each management node The collection result of return,
When determining to have not been obtained the collection result that some management node returns in server cluster, by the state of the management node Labeled as exception and carry out alarming processing;
When the collection result for determining to have not been obtained management node all in server cluster, by the state of the server cluster Labeled as exception and carry out servicing unavailable alarming processing.
8. a kind of monitoring device of server cluster, which is characterized in that the device includes:
Connection establishment unit connects for being established with the management node in server cluster;
Data capture unit, for obtaining the running state data of the management node;
Status determining unit, for when getting the collection result that each management node returns, determining server cluster Operating status it is normal;When the collection result that the management node has not been obtained, determine that the operating status of server cluster is different Often, and alarming processing is carried out.
9. device according to claim 8, which is characterized in that
The data capture unit further includes:Interdependent node data acquisition subelement, for the acquisition returned according to management node As a result the running state data of interdependent node in server cluster is obtained;
The device further includes:Gathered data processing unit, for the collection result to management node and/or interdependent node into line number According to processing and the result after data processing is saved in monitoring data library;The interdependent node includes the management node management Host node and the slave node of host node connection.
10. device according to claim 9, which is characterized in that
The collection result data that the interdependent node data acquisition subelement is returned according to the management node determine the management The unique identification information of the host node of node administration, and according to the unique mark for the host node determined, obtain the fortune of host node Row status data;The collection result returned according to the host node determines the unique mark for the slave node that the host node connects, And according to the unique mark of slave node determined, obtain the running state data from node;
The gathered data processing unit, should for instruction in extract management node and/or the collection result of interdependent node return The configuration information of node or the key message of performance information, using the corresponding numerical value of the key message as management node and/or The key index value of interdependent node;And for respectively with the group of the IP address and port numbers of management node and/or interdependent node Cooperate the unique mark for node, the correspondence between the unique mark of node and the key index value of node is established, by this Correspondence is saved in monitoring data library.
CN201611161638.9A 2016-12-15 2016-12-15 Monitoring method and device for server cluster Active CN108234170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611161638.9A CN108234170B (en) 2016-12-15 2016-12-15 Monitoring method and device for server cluster

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611161638.9A CN108234170B (en) 2016-12-15 2016-12-15 Monitoring method and device for server cluster

Publications (2)

Publication Number Publication Date
CN108234170A true CN108234170A (en) 2018-06-29
CN108234170B CN108234170B (en) 2021-06-22

Family

ID=62651449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611161638.9A Active CN108234170B (en) 2016-12-15 2016-12-15 Monitoring method and device for server cluster

Country Status (1)

Country Link
CN (1) CN108234170B (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067570A (en) * 2018-07-24 2018-12-21 北京信安世纪科技股份有限公司 A kind of server info methods of exhibiting, device and server
CN109151074A (en) * 2018-10-29 2019-01-04 南京感度信息技术有限责任公司 Centralized buffer queue service architecture method and network structure based on Redis
CN109656753A (en) * 2018-12-03 2019-04-19 上海电科智能系统股份有限公司 A kind of Redundant backup system applied to track traffic synthetic monitoring system
CN109800136A (en) * 2018-12-06 2019-05-24 珠海西山居移动游戏科技有限公司 A kind of long-range redis performance data method of sampling and its system
CN110019372A (en) * 2018-08-21 2019-07-16 平安科技(深圳)有限公司 Data monitoring method, device, server and storage medium
CN110737566A (en) * 2019-09-17 2020-01-31 平安科技(深圳)有限公司 Host performance monitoring method and device, electronic equipment and storage medium
CN111190888A (en) * 2020-01-03 2020-05-22 中国建设银行股份有限公司 Method and device for managing graph database cluster
CN111291101A (en) * 2019-12-17 2020-06-16 航天信息股份有限公司 Cluster management method and system
CN111444062A (en) * 2020-04-01 2020-07-24 山东汇贸电子口岸有限公司 Method and device for managing master node and slave node of cloud database
CN111737079A (en) * 2020-05-20 2020-10-02 山东鲸鲨信息技术有限公司 Method and device for monitoring cluster network
CN112073265A (en) * 2020-08-31 2020-12-11 帷幄匠心科技(杭州)有限公司 Internet of things monitoring method and system based on distributed edge computing
CN112364105A (en) * 2020-09-16 2021-02-12 贵州电网有限责任公司 Collection file management method and system based on Redis
CN112463378A (en) * 2020-11-27 2021-03-09 北京浪潮数据技术有限公司 Server asset scanning method, system, electronic equipment and storage medium
CN113542398A (en) * 2021-07-13 2021-10-22 广州云从凯风科技有限公司 Control method, device, medium and equipment of distributed cluster system
CN113572852A (en) * 2021-07-29 2021-10-29 上海浦东发展银行股份有限公司 Method, device, equipment and storage medium for determining redis information
CN113806181A (en) * 2021-09-24 2021-12-17 重庆富民银行股份有限公司 Redis multi-cluster automatic monitoring method and system
CN114090644A (en) * 2022-01-20 2022-02-25 飞狐信息技术(天津)有限公司 Data processing method and device
CN114095506A (en) * 2020-08-25 2022-02-25 李静波 Call center server cluster management method, server and system
CN115426249A (en) * 2022-11-02 2022-12-02 飞天诚信科技股份有限公司 High-availability solution method and device for Redis master-slave architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236949A (en) * 2013-04-27 2013-08-07 北京搜狐新媒体信息技术有限公司 Monitoring method, device and system for server cluster
CN104202423A (en) * 2014-09-19 2014-12-10 中国人民财产保险股份有限公司 System for extending caches by aid of software architectures
CN105630913A (en) * 2015-12-22 2016-06-01 福建星海通信科技有限公司 Redis pipeline communication-based message passing method and system
CN105933407A (en) * 2016-04-20 2016-09-07 中国银联股份有限公司 Method and system for achieving high availability of Redis cluster
CN106209447A (en) * 2016-07-07 2016-12-07 深圳市创梦天地科技有限公司 The fault handling method of distributed caching and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236949A (en) * 2013-04-27 2013-08-07 北京搜狐新媒体信息技术有限公司 Monitoring method, device and system for server cluster
CN104202423A (en) * 2014-09-19 2014-12-10 中国人民财产保险股份有限公司 System for extending caches by aid of software architectures
CN105630913A (en) * 2015-12-22 2016-06-01 福建星海通信科技有限公司 Redis pipeline communication-based message passing method and system
CN105933407A (en) * 2016-04-20 2016-09-07 中国银联股份有限公司 Method and system for achieving high availability of Redis cluster
CN106209447A (en) * 2016-07-07 2016-12-07 深圳市创梦天地科技有限公司 The fault handling method of distributed caching and device

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067570A (en) * 2018-07-24 2018-12-21 北京信安世纪科技股份有限公司 A kind of server info methods of exhibiting, device and server
CN109067570B (en) * 2018-07-24 2021-08-31 北京信安世纪科技股份有限公司 Server information display method and device and server
CN110019372A (en) * 2018-08-21 2019-07-16 平安科技(深圳)有限公司 Data monitoring method, device, server and storage medium
CN110019372B (en) * 2018-08-21 2023-04-11 平安科技(深圳)有限公司 Data monitoring method, device, server and storage medium
CN109151074A (en) * 2018-10-29 2019-01-04 南京感度信息技术有限责任公司 Centralized buffer queue service architecture method and network structure based on Redis
CN109151074B (en) * 2018-10-29 2023-05-23 南京感度信息技术有限责任公司 Redis-based centralized cache queue service architecture method and network structure
CN109656753A (en) * 2018-12-03 2019-04-19 上海电科智能系统股份有限公司 A kind of Redundant backup system applied to track traffic synthetic monitoring system
CN109800136A (en) * 2018-12-06 2019-05-24 珠海西山居移动游戏科技有限公司 A kind of long-range redis performance data method of sampling and its system
CN110737566B (en) * 2019-09-17 2022-12-30 平安科技(深圳)有限公司 Host performance monitoring method and device, electronic equipment and storage medium
CN110737566A (en) * 2019-09-17 2020-01-31 平安科技(深圳)有限公司 Host performance monitoring method and device, electronic equipment and storage medium
CN111291101A (en) * 2019-12-17 2020-06-16 航天信息股份有限公司 Cluster management method and system
CN111190888A (en) * 2020-01-03 2020-05-22 中国建设银行股份有限公司 Method and device for managing graph database cluster
CN111444062A (en) * 2020-04-01 2020-07-24 山东汇贸电子口岸有限公司 Method and device for managing master node and slave node of cloud database
CN111444062B (en) * 2020-04-01 2023-09-19 山东汇贸电子口岸有限公司 Method and device for managing master node and slave node of cloud database
CN111737079B (en) * 2020-05-20 2024-04-09 山东鲸鲨信息技术有限公司 Cluster network monitoring method and device
CN111737079A (en) * 2020-05-20 2020-10-02 山东鲸鲨信息技术有限公司 Method and device for monitoring cluster network
CN114095506A (en) * 2020-08-25 2022-02-25 李静波 Call center server cluster management method, server and system
CN112073265A (en) * 2020-08-31 2020-12-11 帷幄匠心科技(杭州)有限公司 Internet of things monitoring method and system based on distributed edge computing
CN112364105A (en) * 2020-09-16 2021-02-12 贵州电网有限责任公司 Collection file management method and system based on Redis
CN112463378A (en) * 2020-11-27 2021-03-09 北京浪潮数据技术有限公司 Server asset scanning method, system, electronic equipment and storage medium
CN112463378B (en) * 2020-11-27 2023-12-22 北京浪潮数据技术有限公司 Server asset scanning method, system, electronic equipment and storage medium
CN113542398A (en) * 2021-07-13 2021-10-22 广州云从凯风科技有限公司 Control method, device, medium and equipment of distributed cluster system
CN113542398B (en) * 2021-07-13 2023-09-19 广州云从凯风科技有限公司 Management and control method, device, medium and equipment of distributed cluster system
CN113572852A (en) * 2021-07-29 2021-10-29 上海浦东发展银行股份有限公司 Method, device, equipment and storage medium for determining redis information
CN113806181A (en) * 2021-09-24 2021-12-17 重庆富民银行股份有限公司 Redis multi-cluster automatic monitoring method and system
CN114090644A (en) * 2022-01-20 2022-02-25 飞狐信息技术(天津)有限公司 Data processing method and device
CN115426249B (en) * 2022-11-02 2023-03-24 飞天诚信科技股份有限公司 High-availability solution method and device for Redis master-slave architecture
CN115426249A (en) * 2022-11-02 2022-12-02 飞天诚信科技股份有限公司 High-availability solution method and device for Redis master-slave architecture

Also Published As

Publication number Publication date
CN108234170B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN108234170A (en) The monitoring method and device of a kind of server cluster
US7961594B2 (en) Methods and systems for history analysis for access paths in networks
CN110311831B (en) Container cloud-based system resource monitoring method and related equipment
WO2016188100A1 (en) Information system fault scenario information collection method and system
US20160344585A1 (en) Correlating computing network events
CN104717094A (en) Management server and control method for management server
CN109743344B (en) Event storage method and device of comprehensive monitoring system based on rail transit
CN108897658B (en) Method and device for monitoring master database, computer equipment and storage medium
CN112787855A (en) Main/standby management system and management method for wide area distributed service
CN108737574A (en) A kind of node off-line judgment method, device, equipment and readable storage medium storing program for executing
WO2019047070A1 (en) Database maintenance method and system
CN111769981A (en) Decentralized architecture main node election method, data file transmission method and system
CN114884838A (en) Monitoring method of Kubernetes component and server
CN110611603A (en) Cluster network card monitoring method and device
CN104753712A (en) Alarming report method, alarming report node and alarming report system
CN117130730A (en) Metadata management method for federal Kubernetes cluster
CN111597079A (en) Method and system for detecting and recovering MySQL Galera cluster fault
CN111371570B (en) Fault detection method and device for NFV network
CN113448947B (en) Method and device for distributed deployment operation and maintenance of mongo database
CN112838944B (en) Diagnosis and management, rule determination and deployment method, distributed device, and medium
CN113206867A (en) Intelligent data acquisition monitoring system and method and timing acquisition service module
CN111010311B (en) Intelligent network fault diagnosis method based on knowledge graph
CN104796283A (en) Monitoring alarm method
CN113747150B (en) Method and system for testing video service system based on container cloud
CN114816914A (en) Data processing method, equipment and medium based on Kubernetes

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

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Applicant after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601

Applicant before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant