WO2021051582A1 - 服务器集群主机性能监控方法、装置、设备及存储介质 - Google Patents

服务器集群主机性能监控方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021051582A1
WO2021051582A1 PCT/CN2019/117912 CN2019117912W WO2021051582A1 WO 2021051582 A1 WO2021051582 A1 WO 2021051582A1 CN 2019117912 W CN2019117912 W CN 2019117912W WO 2021051582 A1 WO2021051582 A1 WO 2021051582A1
Authority
WO
WIPO (PCT)
Prior art keywords
host
monitoring
slave node
node host
server cluster
Prior art date
Application number
PCT/CN2019/117912
Other languages
English (en)
French (fr)
Inventor
吴超勇
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051582A1 publication Critical patent/WO2021051582A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2294Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by remote test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Definitions

  • This application relates to the field of security monitoring, and in particular to a method, device, equipment, and storage medium for monitoring the performance of a server cluster host.
  • the host performance monitoring of existing production server clusters requires the deployment of monitoring agents on each host to obtain the performance characteristics of the host.
  • Each host must add a large number of log output codes, and, in the face of a large number of server clusters, it may also add special The cost of operation and maintenance.
  • the inventor realized that the massive machine code instructions generated by the motherboard during the operation of each server in the computer server cluster were monitored, and the machine code generated by the motherboard using the real-time stream data acquisition framework in the big data technology
  • the command data is collected in real time, so deployment and update are very cumbersome, and the risk of code intrusion is high.
  • This application provides a method, device, device, and storage medium for monitoring the performance of a server cluster host, the main purpose of which is to establish a master node host and a slave node by establishing a host key generation system and a slave key management system between server clusters The mutual trust relationship between the hosts, and then the host monitoring program is started based on the mutual trust relationship, so as to achieve the monitoring of the performance of the entire server cluster host and ensure the consistency of the performance monitoring of the hosts in the server cluster.
  • the server cluster host performance monitoring method provided by this application is applied to electronic equipment, and the method includes:
  • IP hosts as cluster nodes, building a decentralized point-to-point distributed network through TCP protocol to form a server cluster, and determining the master node host and the slave node host in the server cluster according to the performance of the IP host and the amount of tasks run;
  • the master node host determines whether the operating state is abnormal, and if the operating state is abnormal, an alarm message is generated, and the alarm message is triggered to the monitoring terminal.
  • this application also provides a server cluster host performance monitoring device, which includes:
  • the determining module is used to determine the master node host and the slave node host in the server cluster according to the performance of the IP host and the amount of running tasks;
  • An establishment module for establishing a mutual trust relationship based on a public-private key pair between the master node host and the slave node host through a transmission channel;
  • An acquisition module configured to collect monitoring index values through the master node host and according to the mutual trust relationship, and obtain the running status of the slave node host according to the monitoring index value;
  • the judgment module is used to judge whether the operating state is abnormal through the master node host
  • a generating trigger module is configured to generate an alarm message if the operating state is abnormal, and trigger the alarm message to the monitoring terminal.
  • the present application also provides a server cluster host performance monitoring electronic device, characterized in that the electronic device includes: a memory, a processor, and a computer stored in the memory and capable of running on the processor A program, when the processor executes the computer program, the steps in the method for monitoring the performance of a server cluster host described in any one of the foregoing are implemented.
  • this application also provides a computer-readable storage medium in which a server cluster host performance monitoring analysis program is stored, and the server cluster host performance monitoring analysis program is executed by a processor At the time, the steps in any one of the foregoing server cluster host performance monitoring methods are implemented.
  • the master node host and the slave node host are determined in the server cluster according to the performance of the IP host and the amount of tasks run, and then the master node host , The mutual trust relationship based on public and private key pairs is established between the slave node hosts through the transmission channel, and then the host monitoring program is started to monitor the performance of the server cluster host, which greatly ensures the consistency of the performance monitoring of the hosts in the server cluster , It saves server resources and improves the overall performance of the server cluster.
  • FIG. 1 is a schematic diagram of an application environment of an embodiment of a method for monitoring performance of a server cluster host according to an embodiment of the application;
  • FIG. 2 is a flowchart of a method for monitoring the performance of a server cluster host according to an embodiment of the application
  • Fig. 3 is a diagram of a performance monitoring device for a server cluster host according to an embodiment of the application
  • Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • a method for monitoring the performance of a server cluster host is provided, which is applied to the electronic device 40.
  • FIG. 1 is a schematic diagram of an application environment of a preferred embodiment of a method for monitoring the performance of a server cluster host according to an embodiment of the present application. As shown in FIG. 1, in the implementation environment of this embodiment, a computer device 110 and a computer device 120 are included.
  • the computer device 110 is a single-node computer device in the cluster, for example, a computer device in a server cluster node, and the computer device 110 and the computer device 120 are some nodes in the server cluster.
  • the computer device 110 and the computer device 120 can be a tablet computer, a notebook computer, a desktop computer, etc., which are a cenOS (linux) system. It is best to use a virtual machine. Git and go have been installed, but not limited to this.
  • the computer device 110 and the terminal 110 may be connected via Bluetooth, USB (Universal Serial Bus) or other communication connection methods, which is not limited in this application.
  • Fig. 2 is a flowchart of a method for monitoring the performance of a server cluster host according to an embodiment of the present application. As shown in Figure 2, in this embodiment, the method for monitoring the performance of a server cluster host includes the following steps:
  • S110 Use the IP host as the cluster node, build a decentralized point-to-point distributed network through the TCP protocol to form a server cluster, and determine the master node host and the slave node host in the server cluster according to the performance of the IP host and the amount of tasks run;
  • step S110 first use multiple IP hosts as cluster nodes to build a decentralized point-to-point distributed network through TCP protocol to form a server cluster.
  • a server cluster use virtual machines/Docker containers to build a specific number of servers, and Each server deploys specific middleware and application services, each server establishes a p2p network protocol through the corresponding configuration, and then determines a master node host based on the performance of the IP host corresponding to each host node in the server cluster and the tasks run And multiple slave node hosts.
  • the IP host with the best host performance and the fewest tasks is selected as the master node host, and the rest are slave node hosts; if the host has the best performance and the tasks are not the least, the IP host can also be selected as the master node host. However, the IP host whose host performance is not the best and runs the fewest tasks cannot be selected as the master node host.
  • the evaluation criteria for host performance include at least CPU and memory. The larger the available CPU and memory, the better the host performance.
  • step S120 first establish a master key generation system in the master node host, and establish a slave key management system in the slave node host.
  • the master key generation system is used to generate a public-private key pair
  • the slave key management system is used to receive the public key in the public-private key pair.
  • a public-private key pair is generated in the master key generation system; then the public-private key pair generated by the master key generation system is generated Separate into a public key and a private key.
  • the private key in the public-private key pair is stored in the master node host.
  • the public key in the public-private key pair is based on the ssh (Secure Shell) protocol or stp (Spanning Tree Protocol, Spanning Tree Protocol) upload to the slave key management system of each slave node master in the server cluster, and then establish a transmission channel between the slave key management system and the master key generation system based on at least dubbo, tcp, and http protocols, Through the transmission channel, the public key in the slave key management system decrypts the private key stored in the host node host, and the public key and the private key reach a mutual trust relationship after the decryption is completed.
  • ssh Secure Shell
  • stp Spanning Tree Protocol
  • the process of generating a public-private key pair by the host key generation system in step S120 includes:
  • the specific Directory refers to the special folder used to generate the public-private key pair
  • the preset hidden path refers to the preset folder used to temporarily store the generated public-private key pair
  • the preset path file is preset in the slave
  • the folder in the node host is used to store the public key in the public-private key pair
  • Asymmetric encryption algorithms include but are not limited to RSA algorithm, Elgamal algorithm, Knapsack algorithm, Rabin algorithm, D-H algorithm, ECC algorithm.
  • RSA algorithm a pair of public and private keys can be generated by executing the ssh-keygen-t rsa function;
  • Assigning the corresponding user group and corresponding public key access authority means setting that only authorized slave node hosts can access the public key in the server cluster. If the other node hosts in the server cluster need to access the public key, they need to initiate a request to the master node host. Obtain authorization, the authorized slave node master will store the public key in the slave key management system; during the authorization process, each slave node will have its own corresponding user, the group and authority of the public key file in the cluster It can be set. If the slave node uses the user belonging to the public key to belong to the group and has the corresponding authority (read, write, modify), the corresponding action can be performed.
  • the server cluster belongs to the local area network. Generally, through the use of dubbo, tcp, HTTP and other protocol transmission, you can execute scripts that modify permissions to obtain corresponding permissions;
  • the public key and private key in the public-private key pair are respectively a long unordered combination of letters, numbers and symbols.
  • the longer the string, the safer the secret key system, and the length of the string can be controlled by the encryption algorithm.
  • step S120 the public key in the slave key management system decrypts the private key stored in the host node host, and after the public key and the private key are decrypted, the mutual trust relationship is reached,
  • the slave node host will trigger the execution of the monitoring script, use the private key of the master node host to encrypt the monitoring task, and obtain a string of encrypted cipher text, which is transmitted to the slave node host through the transmission channel, and the monitoring task cipher text is obtained from the node host.
  • the ciphertext header information matches the private key corresponding to the public key in the slave key management system, and decrypts the ciphertext of the monitoring task with the private key to obtain the monitoring task.
  • Step S130 Collect the monitoring index value based on the mutual trust relationship established in step S120 through the master node host, and obtain the running status of the slave node host according to the monitoring index value;
  • step S130 the master node host collects monitoring index values based on the mutual trust relationship established in step S120, and obtains the operating status of the slave node host according to the monitoring index values. If the status is abnormal, the process of generating an alarm message includes:
  • the master node host acquires and saves the IP address sequence of the slave node host based on the mutual trust relationship established in step S120 and saves it, and collects the monitoring indicators of the host performance items of the slave node host in the server cluster based on the obtained IP address sequence of the slave node host value;
  • the host performance item contains at least the performance parameters of CPU, MEM, I/O wait, and disk, that is, the monitoring index values include: the host's central processing unit usage rate cpu.busy, memory usage rate mem.memused.percent, IO wait time disk.io.await, disk usage rate df.statistics.used.percent;
  • Obtaining the running status of the slave node host according to the monitoring indicators means determining the unique identification information of the slave node managed by the master node according to the collection result data returned by the slave node, and obtaining the running status data of the slave node according to the unique identification information.
  • the information is unique to each slave node host and can explain the running status of the slave node host.
  • Step S140 Determine whether the operating status is abnormal by the master node host, and if the operating status is abnormal, generate an alarm message and trigger the alarm message to the monitoring terminal.
  • the monitoring terminal mentioned here should periodically check all slave node hosts in the server cluster to determine whether to collect and obtain the monitoring index value returned by each slave node host. When it is determined that no one in the server cluster has been obtained When collecting the results returned from the node host, mark the status of the slave node host as abnormal and perform alarm processing; when it is determined that the monitoring index values of all node hosts in the server cluster are not collected, the status of the server cluster is marked as Exception and perform service unavailability alarm processing.
  • the master node host and the slave node host are determined in the server cluster, and the host key generation system is established in the master node host, and the host key management system is established in the slave node host.
  • this application also provides a server cluster host performance monitoring device.
  • FIG. 3 is a diagram 300 of a performance monitoring device for a server cluster host proposed in this application.
  • the device 300 corresponds to a method for monitoring the performance of a server cluster host and is placed in a server cluster host performance monitoring electronic device.
  • the device includes a building formation module 310, a determination module 320, an establishment module 330, an acquisition module 340, a judgment module 350, and a generation trigger module 360.
  • the building forming module 310 is used to build a decentralized point-to-point distributed network through the TCP protocol with the IP host as the cluster node to form a server cluster;
  • the determining module 320 is used to determine the master node host and the slave node host in the server cluster built by the building forming module 310 according to the performance of the IP host and the amount of tasks run;
  • the establishment module 330 is configured to establish a mutual trust relationship based on a public-private key pair between the master node host and the slave node host determined by the determining module 320 through a transmission channel;
  • the acquisition module 340 is configured to collect monitoring index values through the master node host and the mutual trust relationship established by the establishment module 330, and obtain the running status of the slave node host according to the monitoring index value;
  • the judging module 350 is used for judging whether the running state acquired by the collection and acquisition module 340 is abnormal through the master node host;
  • the generating triggering module 360 is configured to generate an alarm message if the judgment module 350 judges that the running state is abnormal, and trigger the alarm message to the monitoring terminal.
  • the determining module 320 may also include a host performance indicator generating unit, a sorting unit, and a determining unit (not shown in the figure).
  • the host performance index generating unit is used to generate host performance indicators according to the size of the CPU and/or memory of the IP host
  • the sorting unit is used to sort and combine the IP hosts in the server cluster according to the host performance indicators and the amount of tasks the host runs. Generate the sorting result
  • the determining unit is used to determine the master node host according to the sorting result, and the remaining nodes except the master node host are slave node hosts.
  • the establishment module may also include a system establishment unit, a key pair generation unit, a key pair separation unit, a public key upload unit, and a channel establishment unit (not shown in the figure).
  • the system establishment unit is used to establish a master key generation system in the master node host and a slave key management system in the slave node host;
  • the key pair generation unit is used to establish a secret key generation system in the host based on an asymmetric encryption algorithm.
  • the key generation system generates a public-private key pair; a key pair separation unit is used to separate the public-private key pair generated by the host key generation system, and store the private key in the public-private key pair in the master node host;
  • the key uploading unit is used to upload the public key in the public-private key pair to the slave key management system of each slave node master in the server cluster based on the ssh protocol or stp; the channel establishment unit is used for the slave secret
  • a transmission channel is established based on any of the dubbo protocol, tcp protocol, and http protocol. The transmission channel is used to transmit the public key and realize the decryption of the private key To establish a relationship of mutual trust.
  • the key pair generation unit may also include a generation unit and a storage unit (not shown in the figure).
  • the generating unit is used to generate a public-private key pair about the master node host under the preset directory of the master node host; wherein the public key and private key in the public-private key pair are a combination of letters, numbers and symbols; save The unit is used to store the public key and the private key in the public-private key pair respectively under the preset hidden path, and assign the user belonging group and corresponding public key access authority to the slave node host.
  • the saving unit sets a public key access authority for the slave node host through the master node host, and the access authority is used for the slave node host to access the public key.
  • the acquisition module 340 may further include an address sequence acquisition unit, a monitoring index value acquisition unit, and a judgment unit (not shown in the figure). among them,
  • the address sequence obtaining unit is configured to obtain and save the IP address sequence of the slave node host through the master node host and according to the mutual trust relationship;
  • a monitoring index value obtaining unit configured to collect the monitoring index value of the host performance item of the slave node host in the server cluster based on the IP address sequence of the slave node host obtained by the address sequence obtaining unit;
  • the judging unit is used to judge whether the monitoring index value acquisition unit has collected the monitoring index value of each slave node host, and when it is judged that the monitoring index value of each slave node is collected, the slave node is obtained according to the monitoring index value
  • the running status of the host, the running status of the slave node host is normal; when it is determined that the monitoring index value of each slave node is not collected, the running status of the slave node host is obtained according to the monitoring index value ,
  • the operating state of the slave node host is an abnormal state.
  • the above server cluster host performance monitoring device is established by determining the master node host and the slave node host in the server cluster, and establishing a host key generation system in the master node host, and a host key management system in the slave node host.
  • FIG. 4 is a schematic diagram of the electronic device of this application.
  • the electronic device 40 may be a terminal device with arithmetic function such as a server, a tablet computer, a portable computer, a desktop computer, and the like.
  • the electronic device 40 includes a processor 41, a memory 42, a computer program 43, a network interface, and a communication bus.
  • the electronic device 40 may be a tablet computer, a desktop computer, or a smart phone, but is not limited thereto.
  • the memory 42 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like.
  • the readable storage medium may be an internal storage unit of the electronic device 40, such as a hard disk of the electronic device 40.
  • the readable storage medium may also be an external memory of the electronic device 40, such as a plug-in hard disk equipped on the electronic device 40, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the readable storage medium of the memory 42 is generally used to store the computer program 43 installed in the electronic device 40, the building formation module 310, the determination module 320, the establishment module 330, the acquisition module 340, the judgment module 350, and the generation module. Trigger module 360 and so on.
  • the processor 41 may be a central processing unit (CPU), microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing data stored in the memory 42, such as the performance of the server cluster host Monitoring program 43 and so on.
  • CPU central processing unit
  • microprocessor or other data processing chip in some embodiments, and is used to run the program code or processing data stored in the memory 42, such as the performance of the server cluster host Monitoring program 43 and so on.
  • the network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 40 and other electronic devices.
  • a standard wired interface such as a WI-FI interface
  • WI-FI interface wireless interface
  • the communication bus is used to realize the connection and communication between these components.
  • FIG. 4 only shows the electronic device 40 with the components 41-43, but it should be understood that it is not required to implement all of the illustrated components, and more or fewer components may be implemented instead.
  • the memory 42 as a computer storage medium may include an operating system and a server cluster host performance monitoring program 43; the processor 41 executes the server cluster host performance monitoring stored in the memory 42 The following steps are implemented in program 43:
  • IP hosts as cluster nodes, build a decentralized point-to-point distributed network through TCP protocol to form a server cluster, and determine the master node host and slave node host in the server cluster according to the performance of the IP host and the amount of tasks run;
  • the master node host determines whether the running status is abnormal. If the running status is abnormal, an alarm message is generated and the alarm message is triggered to the monitoring terminal.
  • the process includes:
  • the basis for determining the good performance of the host includes at least the host's CPU and memory. The larger the available CPU and memory, the greater the host's The better the performance.
  • the process of establishing a mutual trust relationship based on a public-private key pair between the master node host and the slave node host through the transmission channel includes:
  • the master key generation system is used to generate a public-private key pair
  • the slave key management system is used to receive public and private keys.
  • a public-private key pair is generated in the host key generation system
  • the private key in the public-private key pair is stored in the master node host, and the public key in the public-private key pair is uploaded to each server cluster based on the ssh protocol or stp
  • the slave key management system of the slave node master
  • a transmission channel is established between the slave key management system and the master key generation system based on at least dubbo, tcp, and http protocols.
  • the public key pair in the slave key management system is stored in the private host of the master node.
  • the key is decrypted, and the public key and the private key are decrypted to reach a mutual trust relationship.
  • the process of generating a public-private key pair in the host key generation system includes:
  • the process of assigning the corresponding user groups and permissions includes:
  • the master node host collects monitoring index values based on the mutual trust relationship, and obtains the running status of the slave node host according to the monitoring index values. If the status is abnormal, the process of generating an alarm message includes:
  • the master node host obtains and saves the IP address sequence of the slave node host based on the mutual trust relationship, and collects the monitoring index value of the host performance item of the slave node host in the server cluster based on the obtained IP address sequence of the slave node host;
  • the monitoring index values of this host performance item include at least:
  • the CPU usage rate, memory usage rate, IO wait time, and disk usage rate of the host are the CPU usage rate, memory usage rate, IO wait time, and disk usage rate of the host.
  • the process of obtaining the operating status of the slave node host according to the monitoring indicators includes:
  • each slave node host corresponds to a unique identification information.
  • the embodiment of the present application also proposes a computer-readable storage medium.
  • the computer-readable storage medium stores a server cluster host performance monitoring program.
  • the server cluster host performance monitoring program implements the following operations when executed by a processor:
  • IP hosts as cluster nodes, build a decentralized point-to-point distributed network through TCP protocol to form a server cluster, and determine the master node host and slave node host in the server cluster according to the performance of the IP host and the amount of tasks run;
  • the monitoring index values are collected through the master node host and based on the mutual trust relationship, and the running status of the slave node host is obtained according to the monitoring index value; the master node host judges whether the running status is abnormal, if the running status is abnormal, an alarm message is generated and the alarm is reported The text is triggered to the monitoring terminal.
  • the computer-readable storage medium described in this application may be a non-volatile computer-readable storage medium.

Abstract

本申请涉及安全监控技术领域,提出一种服务器集群主机性能监控方法,该方法包括:以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机;在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;通过主节点主机及根据互信关系采集监控指标值,根据监控指标值获取所述从节点主机的运行状态;通过主节点主机判断所述运行状态是否异常,若运行状态异常,则生成告警报文,并将告警报文触发至监控端。

Description

服务器集群主机性能监控方法、装置、设备及存储介质
本申请要求申请号为201910875135.5,申请日为2019年9月17日,发明创造名称为“主机性能监控方法及装置、电子设备及存储介质”的专利申请的优先权。
技术领域
本申请涉及安全监控领域,尤其涉及一种服务器集群主机性能监控方法、装置、设备及存储介质。
背景技术
现有生产服务器集群的主机性能监控需要在每台主机上部署监控agent获取主机的性能特征,每个主机都要新增大量的日志输出代码,并且,面对大量的服务器集群,可能还增加专门的运维成本。
对服务器集群进行性能监控时,发明人意识到,监控计算机服务器集群中的各个服务器在运行过程中主板产生的海量机器码指令,利用大数据技术中的实时流数据采集框架对主板产生的机器码指令数据进行实时采集,这样部署和更新十分繁琐,代码侵入性风险大。
因此,亟需一种只通过监控某一主机性能就能触发整个服务器集群之间主机性能监控的方法。
发明内容
本申请提供一种服务器集群主机性能监控方法、装置、设备及存储介质,其主要目的在于通过在服务器集群之间建立主机密钥生成系统、从机密钥管理系统来建立主节点主机与从节点主机之间的互信关系,然后基于该互信关系启动主机监控程序,进而达成对整个服务器集群主机性能的监控,确保服务器集群中各主机的性能监控的一致性。
为实现上述目的,本申请提供的服务器集群主机性能监控方法,应用于电子设备,所述方法包括:
以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机;
在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
通过所述主节点主机及根据所述互信关系采集监控指标值,根据所述监控指标值获取所述从节点主机的运行状态;
通过所述主节点主机判断所述运行状态是否异常,若所述运行状态异常,则生成告警报文,并将所述告警报文触发至监控端。
为实现上述目的,本申请还提供一种服务器集群主机性能监控装置,该装置包括:
搭建形成模块,用于以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群;
确定模块,用于根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机;
建立模块,用于在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
采集获取模块,用于通过所述主节点主机及根据所述互信关系采集监控指标值,根据所述监控指标值获取所述从节点主机的运行状态;
判断模块,用于通过所述主节点主机判断所述运行状态是否异常;
生成触发模块,用于若所述运行状态异常,则生成告警报文,并将所述告警报文触发至监控端。
为实现上述目的,本申请还提供一种服务器集群主机性能监控电子设备,其特征在于,该电子设备包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现前述任一项所述的服务器集群主机性能监控方法中的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有服务器集群主机性能监控分析程序,所述服务器集群主机性能监控分析程序被处理器执行时,实现前述任一项的服务器集群 主机性能监控方法中的步骤。
本申请提出的服务器集群主机性能监控方法、装置、设备及存储介质,根据IP主机的性能和所跑任务量在所述服务器集群中确定主节点主机、从节点主机,然后在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系,进而启动主机监控程序达成对所述服务器集群主机性能的监控,极大地确保了服务器集群中各主机的性能监控的一致性,节省了服务器资源,提升了服务器集群的整体性能。
附图说明
图1为本申请实施例的服务器集群主机性能监控方法实施例的应用环境示意图;
图2为本申请实施例的服务器集群主机性能监控方法的流程图;
图3为本申请实施例的服务器集群主机性能监控装置图;
图4为根据本申请实施例的电子设备的结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
为了解决前述现有生产服务器集群的主机性能监控需要在每台主机上部署监控agent获取主机的性能特征,部署和更新繁琐,代码侵入性风险大,运维成本高的问题,本申请从非对称加密算法入手,首先在服务器集群中确定主节点主机、从节点主机,然后建立主机密钥生成系统、从机密钥管理系统,建立主节点主机与从节点主机的互信关系,进而基于该互信关系调用监控程序完成对服务器集群主机性能的监控。
具体的,根据本申请的一个实施例,提供一种服务器集群主机性能监控方法,应用于电子设备40。
图1为根据本申请实施例的服务器集群主机性能监控方法较佳实施例的应用环境示意图。如图1所示,在本实施例的实施环境中,包括计算机设备 110以及计算机设备120。
其中的计算机设备110为集群中单节点的计算机设备,例如服务器集群节点中的电脑等计算机设备,计算机设备110与计算机设备120为服务器集群中的部分节点。
需要说明的是,计算机设备110以及计算机设备120可为平板电脑、笔记本电脑、台式计算机等,其为cenOS(linux)系统,最好使用虚拟机,已安装了git,go,但并不局限于此。计算机设备110以及终端110可以通过蓝牙、USB(Universal Serial Bus,通用串行总线)或者其他通讯连接方式进行连接,本申请在此不做限制。
图2为根据本申请实施例的服务器集群主机性能监控方法的流程图。如图2所示,在本实施例中,服务器集群主机性能监控方法包括如下步骤:
S110:以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在服务器集群中确定主节点主机、从节点主机;
步骤S110中,首先以多个IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络形成服务器集群,在形成服务器集群时运用虚拟机/Docker容器构建特定数量的服务器,并在每个服务器部署特定的中间件和应用服务,各服务器之间通过相应的配置建立p2p网络协议,然后依据该服务器集群中各主机节点所对应的IP主机的性能和所跑任务确定出一个主节点主机以及多个从节点主机。一般,选择主机性能最好、所跑任务最少的IP主机为主节点主机,其余为从节点主机;若主机性能最好、所跑任务非最少,也可选定该IP主机为主节点主机,但主机性能非最好、所跑任务为最少的IP主机不可选定为主节点主机。其中,主机性能的评判标准至少包括CPU和内存,可用CPU和内存越大,主机性能越好。
S120:在步骤S110确定的主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
在步骤S120中,首先在主节点主机中建立主机密钥生成系统,在从节点主机中建立从机密钥管理系统。其中,主机密钥生成系统用于生成公私密钥对,从机密钥管理系统用于接收公私密钥对中的公钥。
在分别建立了主机密钥生成系统和从机密钥管理系统之后,再基于非对 称加密算法,在主机密钥生成系统生成公私密钥对;然后将主机密钥生成系统生成的公私密钥对分离为公钥和私钥,该公私密钥对中的私钥存储于主节点主机中,该公私密钥对中的公钥基于ssh(Secure Shell,安全外壳)协议或stp(Spanning Tree Protocol,生成树协议)上传至服务器集群中各从机节点主机的从机密钥管理系统,进而在从机密钥管理系统与主机密钥生成系统之间至少基于dubbo、tcp、http协议建立传输通道,通过该传输通道,从机密钥管理系统中的公钥对存储于主机节点主机中的私钥进行解密,该公钥与该私钥解密完成后达成互信关系。
其中,在步骤S120中的该主机密钥生成系统生成公私密钥对的过程包括:
在主节点主机特定目录之下基于非对称加密算法生成关于该主机的公私密钥对,并且将该公私密钥对分别保存在预设的隐藏路径下,并分配对应的用户属组和权限,同时密钥管理系统中还会有一个预设的路径文件,保存上传至从节点主机中的公钥,并为该公钥分配相应的用户属组和对应公钥的访问权限;其中,该特定目录指专门的文件夹用以生成该公私密钥对;该预设的隐藏路径指预设的文件夹,用来暂时存放生成的公私密钥对;该预设的路径文件是预设在从节点主机中的文件夹,用来存储该公私密钥对中的公钥;
非对称加密算法包括但不限于RSA算法、Elgamal算法、背包算法、Rabin算法、D-H算法、ECC算法,以RSA算法为例,通过执行ssh-keygen–t rsa函数即可生成一对公私钥;
分配相应的用户属组和对应公钥的访问权限即设置只有授权的从节点主机才能访问服务器集群中的公钥,服务器集群中其余节点主机如需访问公钥,需要向主节点主机发起请求并获得授权,获得授权的从节点主机将公钥存储于从机密钥管理系统;在获得授权过程中,每个从节点都会有自己相应的使用用户,集群中公钥的文件的属组和权限是可以设定的,如果从节点用属于该公钥的用户属组并有相应的权限(读、写、修改),就可以执行相应的动作,服务器集群属于局域网,一般通过使用dubbo、tcp、http等协议传输,可以执行修改权限的脚本,获得相应的权限;
公私密钥对中的公钥和私钥分别是一长串无序的字母,数字和符号的组合,字符串越长,秘钥系统安全,字符串的长度可由加密算法算法控制。
其中,在在步骤S120中的通过传输通道,从机密钥管理系统中的公钥对 存储于主机节点主机中的私钥进行解密,公钥与私钥解密完成后达成互信关系的过程中,从节点主机会触发执行监控脚本,利用主节点主机的私钥对监控任务进行加密,得到一串加密后的密文,通过传输通道传输至从节点主机,从节点主机获得监控任务密文,根据密文头信息,匹配与从机密钥管理系统中的公钥相对应的私钥,用私钥对监控任务密文进行解密,获得监控任务。
步骤S130:通过主节点主机基于步骤S120所建立的互信关系采集监控指标值,并根据监控指标值获取从节点主机的运行状态;
在步骤S130中,主节点主机基于步骤S120所建立的互信关系采集监控指标值,并根据监控指标值获取从节点主机的运行状态,若状态异常,则生成告警报文过程包括:
主节点主机基于步骤S120所建立的互信关系获取并保存从节点主机的IP地址序列并保存,并基于所获取的从节点主机的IP地址序列采集服务器集群中从节点主机上主机性能项的监控指标值;
其中,主机性能项至少含有CPU、MEM、I/O wait、disk的性能参数,即监控指标值包括:主机的中央处理器使用率cpu.busy、内存使用率mem.memused.percent、IO等待时间disk.io.await、磁盘使用率df.statistics.used.percent;
其中根据监控指标获取从节点主机的运行状态即根据从节点返回的采集结果数据确定出主节点管理的从节点的唯一标识信息,并根据唯一标识信息,获取从节点的运行状态数据,该唯一标识信息是每个从节点主机独有的、且能说明该从节点主机运行状态的信息。
步骤S140:通过主节点主机判断运行状态是否异常,若运行状态异常,则生成告警报文并将告警报文触发至监控端。
判断是否采集到每个从节点主机的监控指标值,当采集到每个从节点的监控指标值时,确定服务器集群的运行状态为正常状态,并根据监控指标值获取从节点主机的运行状态;当未采集到从节点的采集结果时,确定服务器集群的运行状态为异常状态,并生成基于简单网络管理协议的SNMP告警报文。
其中,这里所说的监控端要周期性地对服务器集群中所有的从节点主机进行检查,确定是否采集获取到每个从节点主机返回的监控指标值,当确定未获取到服务器集群中某个从节点主机返回的采集结果时,将该从节点主机的 状态标记为异常并进行告警处理;当确定未采集获取到服务器集群中所有节点主机的监控指标值时,将该服务器集群的状态标记为异常并进行服务不可用告警处理。
本实施例中服务器集群主机性能监控方法通过在服务器集群中确定出主节点主机、从节点主机,并在该主节点主机中建立主机密钥生成系统,在从节点主机中建立主机密钥管理系统的方式建立主节点主机、从节点主机之间的可信关系,进而启动监控程序,生成告警报文完成对服务器集群的监控,摆脱在每台主机单独部署agent获取性能特征的现状,降低了代码侵入性风险,节省了时间成本及运维成本,确保了服务器集群中各主机性能监控的一致性。
与上述服务器集群主机性能监控方法相对应,本申请还提供一种服务器集群主机性能监控装置。
图3为本申请提出的服务器集群主机性能监控装置图300,该装置300对应于服务器集群主机性能监控方法,置于服务器集群主机性能监控电子设备中。该装置包括搭建形成模块310、确定模块320、建立模块330、采集获取模块340、判断模块350和生成触发模块360。
该搭建形成模块310,用于以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群;
确定模块320,用于根据IP主机的性能和所运行任务量在搭建形成模块310搭建的服务器集群中确定主节点主机、从节点主机;
建立模块330,用于在确定模块320所确定的主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
采集获取模块340,用于通过主节点主机及根据建立模块330所建立的互信关系采集监控指标值,根据监控指标值获取从节点主机的运行状态;
判断模块350,用于通过主节点主机判断采集获取模块340所获取的运行状态是否异常;
生成触发模块360,用于若判断模块350判断运行状态异常,则生成告警报文,并将告警报文触发至监控端。
优选的,确定模块320还可以包括主机性能指标生成单元、排序单元以及确定单元(图中未示出)。其中,主机性能指标生成单元用于根据IP主机的CPU和/或内存的大小生成主机性能指标;排序单元用于根据主机性能指标和 主机所运行任务量对服务器集群中的各IP主机进行排序并生成排序结果;确定单元,用于根据排序结果确定出主节点主机,除主节点主机外的其余节点为从节点主机。
此外,建立模块还可以包括系统建立单元、密钥对生成单元、密钥对分离单元、公钥上传单元以及通道建立单元()图中未示出。
其中,系统建立单元,用于在主节点主机中建立主机密钥生成系统,在从节点主机中建立从机密钥管理系统;密钥对生成单元,用于基于非对称加密算法,在主机密钥生成系统生成公私密钥对;密钥对分离单元,用于将主机密钥生成系统生成的公私密钥对分离,并存储所述公私密钥对中的私钥于主节点主机中;公钥上传单元,用于基于ssh协议或stp将所述公私密钥对中的公钥上传至服务器集群中各从机节点主机的从机密钥管理系统;通道建立单元,用于在从机密钥管理系统与主机密钥生成系统之间,基于dubbo协议、tcp协议、http协议中的任一协议建立传输通道,所述传输通道用于传输所述公钥并实现对所述私钥的解密,以建立互信关系。
此外,密钥对生成单元还可以包括生成单元和保存单元(图中未示出)。具体的,生成单元用于在主节点主机的预设目录下生成关于主节点主机的公私密钥对;其中,公私密钥对中的公钥、私钥为字母,数字和符号的组合;保存单元用于将公私密钥对中的公钥、私钥分别保存在预设隐藏路径下,并为从节点主机分配用户属组和对应的公钥访问权限。作为示例,保存单元通过主节点主机为所述从节点主机设置公钥访问权限,该访问权限用于供所述从节点主机访问所述公钥。
优选的,采集获取模块340还可以包括地址序列获取单元、监控指标值获取单元以及判断单元(图中未示出)。其中,
地址序列获取单元,用于通过主节点主机及根据所述互信关系获取从节点主机的IP地址序列并保存;
监控指标值获取单元,用于基于地址序列获取单元所获取的从节点主机的IP地址序列采集所述服务器集群中从节点主机上主机性能项的监控指标值;
判断单元,用于判断监控指标值获取单元是否采集到每个从节点主机的监控指标值,当判断出采集到每个从节点的监控指标值时,根据所述监控指标 值获取所述从节点主机的运行状态,所述从节点主机的运行状态为正常状态;当判断出未采集到每个所述从节点的监控指标值时,根据所述监控指标值获取所述从节点主机的运行状态,所述从节点主机的运行状态为异常状态。
本实施例所提供的服务器集群主机性能监控装置中的各模块、单元所实现的功能和/或操作与上述实施例中服务器集群主机性能监控方法中对应的步骤一一对应,其具体的实施细节也大致相同,在此不再赘述。
上述服务器集群主机性能监控装置通过在服务器集群中确定出主节点主机、从节点主机,并在该主节点主机中建立主机密钥生成系统,在从节点主机中建立主机密钥管理系统的方式建立主节点主机、从节点主机之间的可信关系,进而启动监控程序,生成告警报文完成对服务器集群的监控,摆脱在每台主机单独部署agent获取性能特征的现状,降低了代码侵入性风险,节省了时间成本及运维成本,确保了服务器集群中各主机性能监控的一致性。
图4为本申请电子设备示意图,在本实施例中,电子设备40可以是服务器、平板计算机、便携计算机、桌上型计算机等具有运算功能的终端设备。
该电子设备40包括:处理器41、存储器42、计算机程序43、网络接口及通信总线。
电子设备40可以是平板电脑、台式电脑、智能手机,但不限于此。
存储器42包括至少一种类型的可读存储介质。该至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子设备40的内部存储单元,例如该电子设备40的硬盘。在另一些实施例中,可读存储介质也可以是电子设备40的外部存储器,例如电子设备40上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
在本实施例中,存储器42的可读存储介质通常用于存储安装于电子设备40的计算机程序43,搭建形成模块310、确定模块320、建立模块330、采集获取模块340、判断模块350和生成触发模块360等。
处理器41在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器42中存储的程序代码或处理数据,例如服务器集群主机性能监控程序43等。
网络接口可选地可以包括标准的有线接口、无线接口(如WI-FI接口), 通常用于在该电子设备40与其他电子设备之间建立通信连接。
通信总线用于实现这些组件之间的连接通信。
图4仅示出了具有组件41-43的电子设备40,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
在图4所示的电子设备实施例中,作为一种计算机存储介质的存储器42中可以包括操作系统、以及服务器集群主机性能监控程序43;处理器41执行存储器42中存储的服务器集群主机性能监控程序43时实现如下步骤:
以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在服务器集群中确定主节点主机、从节点主机;
在主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
通过主节点主机及根据互信关系采集监控指标值,根据监控指标值获取从节点主机的运行状态;
通过主节点主机判断运行状态是否异常,若运行状态异常,则生成告警报文,并将告警报文触发至监控端。
在根据各主机节点所对应IP主机的性能和所运行任务量在服务器集群中确定主节点主机、从节点主机的过程中,包括:
选择主机性能最好、所跑任务较少的IP主机为主节点主机,其余节点为从节点主机;判定主机性能好的判断依据至少包括主机的CPU、内存,可用CPU和内存越大,主机的性能越好。
在主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系的过程包括:
在主节点主机中建立主机密钥生成系统,在从节点主机中建立从机密钥管理系统;其中,主机密钥生成系统用于生成公私密钥对,从机密钥管理系统用于接收公私密钥对中的公钥;
基于非对称加密算法,在主机密钥生成系统生成公私密钥对;
将主机密钥生成系统生成的公私密钥对分离;其中,公私密钥对中的私钥存储于主节点主机中,公私密钥对中的公钥基于ssh协议或stp上传至服务器集群中各从机节点主机的从机密钥管理系统;
在从机密钥管理系统与主机密钥生成系统之间至少基于dubbo、tcp、http协议建立传输通道,通过传输通道,从机密钥管理系统中的公钥对存储于主机节点主机中的私钥进行解密,公钥与私钥解密完成后达成互信关系。
在基于非对称加密算法,在主机密钥生成系统生成公私密钥对的过程中,包括:
在主节点主机的预设目录下生成关于该主节点主机的公私密钥对;其中,公私密钥对中的公钥、私钥分别是一长串无序的字母,数字和符号的组合;
将公私密钥对中的公钥、私钥分别保存在特定的隐藏路径下,并为从节点主机分配对应的用户属组和权限;
在分配对应的用户属组和权限的过程中,包括:
通过主节点主机为从节点主机设置访问权限;其中,
只有具有访问权限的从节点主机才能访问服务器集群的公钥,服务器集群中的节点主机如需访问公钥,需要向主节点主机发起请求并获得授权。
主节点主机基于互信关系采集监控指标值,并根据监控指标值获取从节点主机的运行状态,若状态异常,则生成告警报文的过程包括:
主节点主机基于互信关系获取从节点主机的IP地址序列并保存,并基于所获取的从节点主机的IP地址序列采集服务器集群中从节点主机上主机性能项的监控指标值;
判断是否采集到每个从节点主机的监控指标值,当采集到每个从节点的监控指标值时,确定服务器集群的运行状态为正常状态,并根据监控指标值获取从节点主机的运行状态;当未采集到从节点的采集结果时,确定服务器集群的运行状态为异常状态,并生成基于简单网络管理协议的SNMP告警报文。
该主机性能项的监控指标值至少包括:
主机的中央处理器使用率、内存使用率、IO等待时间、磁盘使用率。
根据监控指标获取从节点主机的运行状态的过程包括:
根据从节点返回的采集结果数据确定出主节点管理的从节点的唯一标识信息,并根据唯一标识信息,获取从节点的运行状态数据;
其中,每个从节点主机对应一个唯一标识信息。
此外,本申请实施例还提出一种计算机可读存储介质,计算机可读存储介质中存储有服务器集群主机性能监控程序,该服务器集群主机性能监控程序 被处理器执行时实现如下操作:
以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在服务器集群中确定主节点主机、从节点主机;
在主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
通过主节点主机及根据互信关系采集监控指标值,根据监控指标值获取从节点主机的运行状态;通过主节点主机判断运行状态是否异常,若运行状态异常,则生成告警报文,并将告警报文触发至监控端。
本申请中所述的计算机可读存储介质可以为计算机非易失性可读存储介质。
本申请之计算机可读存储介质的具体实施方式与上述服务器集群主机性能监控方法、装置、设备的具体实施方式大致相同,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接 运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种服务器集群主机性能监控方法,应用于电子设备,其特征在于,所述方法包括:
    以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群,并根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机;
    在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
    通过所述主节点主机及根据所述互信关系采集监控指标值,根据所述监控指标值获取所述从节点主机的运行状态;
    通过所述主节点主机判断所述运行状态是否异常,若所述运行状态异常,则生成告警报文,并将所述告警报文触发至监控端。
  2. 根据权利要求1所述的服务器集群主机性能监控方法,其特征在于,在根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机的过程中,包括:
    根据IP主机的CPU和/或内存的大小生成主机性能指标;
    根据主机性能指标和主机所运行任务量对所述服务器集群中的各IP主机进行排序并生成排序结果;
    根据所述排序结果确定出主节点主机,除主节点主机外的其余节点为从节点主机。
  3. 根据权利要求1所述的服务器集群主机性能监控方法,其特征在于,在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系的过程包括:
    在所述主节点主机中建立主机密钥生成系统,在所述从节点主机中建立从机密钥管理系统;
    基于非对称加密算法,在所述主机密钥生成系统生成公私密钥对;
    将所述主机密钥生成系统生成的公私密钥对分离,并存储所述公私密钥对中的私钥于主节点主机中;
    基于ssh协议或stp将所述公私密钥对中的公钥上传至服务器集群中各 从机节点主机的从机密钥管理系统;
    在所述从机密钥管理系统与主机密钥生成系统之间,基于dubbo协议、tcp协议、http协议中的任一协议建立传输通道,所述传输通道用于传输所述公钥并实现对所述私钥的解密,以建立互信关系。
  4. 根据权利要求3所述的服务器集群主机性能监控方法,其特征在于,在基于非对称加密算法,在所述主机密钥生成系统生成公私密钥对的过程中,包括:
    在所述主节点主机的预设目录下生成关于所述主节点主机的公私密钥对;其中,所述公私密钥对中的公钥、私钥为字母,数字和符号的组合;
    将所述公私密钥对中的公钥、私钥分别保存在预设隐藏路径下,并为所述从节点主机分配用户属组和对应的公钥访问权限。
  5. 根据权利要求4所述的服务器集群主机性能监控方法,其特征在于,在分配对应的用户属组和对应的公钥访问权限的过程中,包括:
    通过所述主节点主机为所述从节点主机设置公钥访问权限,所述访问权限用于供所述从节点主机访问所述公钥。
  6. 根据权利要求4所述的服务器集群主机性能监控方法,其特征在于,在所述主节点主机的预设目录下生成关于所述主节点主机的公私密钥对之后,还包括:
    通过预设的路径文件,保存上传至从节点主机中的公钥,并为所述公钥分配用户属组和对应的公钥访问权限;其中,所述预设的路径文件为预设在从节点主机中的文件夹。
  7. 根据权利要求3所述的服务器集群主机性能监控方法,其特征在于,所述非对称加密算法为RSA算法、Elgamal算法、背包算法、Rabin算法、D-H算法、ECC算法中的一种。
  8. 根据权利要求3所述的服务器集群主机性能监控方法,其特征在于,所述传输通道在传输所述公钥并实现对所述私钥的解密,以建立互信关系的过程中,包括:
    通过所述从节点主机触发执行监控脚本,并利用所述主节点主机的私钥对监控任务进行加密得到监控任务密文;
    通过所述传输通道将所述监控任务密文传输至所述从节点主机;
    通过所述从节点主机和所述监控任务密文,匹配与所述从机密钥管理系统中的公钥相对应的私钥,并用所述私钥对所述监控任务密文进行解密,获得监控任务。
  9. 根据权利要求1所述的服务器集群主机性能监控方法,其特征在于,通过所述主节点主机及根据所述互信关系采集监控指标值,根据所述监控指标值获取所述从节点主机的运行状态的过程包括:
    通过所述主节点主机及根据所述互信关系获取从节点主机的IP地址序列并保存,并基于所获取的从节点主机的IP地址序列采集所述服务器集群中从节点主机上主机性能项的监控指标值;
    判断是否采集到每个从节点主机的监控指标值,当判断出采集到每个从节点的监控指标值时,根据所述监控指标值获取所述从节点主机的运行状态,所述从节点主机的运行状态为正常状态;当判断出未采集到每个所述从节点的监控指标值时,根据所述监控指标值获取所述从节点主机的运行状态,所述从节点主机的运行状态为异常状态。
  10. 根据权利要求9所述的服务器集群主机性能监控方法,其特征在于,
    所述主机性能项的监控指标值包括所述主机的中央处理器使用率、内存使用率、IO等待时间、磁盘使用率中的一项或多项。
  11. 根据权利要求9所述的服务器集群主机性能监控方法,其特征在于,根据所述监控指标获取所述从节点主机的运行状态的过程包括:
    根据所述监控指标确定出从节点主机的标识信息,并根据所述标识信息获取所述从节点主机的运行状态数据,每个从节点主机具有唯一对应的标识信息。
  12. 根据权利要求1所述的服务器集群主机性能监控方法,其特征在于,在通过所述主节点主机判断所述运行状态是否异常的过程中,
    判断是否采集到每个从节点主机的监控指标值,当采集到每个从节点的监控指标值时,确定服务器集群的运行状态为正常状态;当未采集到从节点的采集结果时,确定服务器集群的运行状态为异常状态。
  13. 一种服务器集群主机性能监控装置,其特征在于,所述装置包括:
    搭建形成模块,用于以IP主机为集群节点,通过TCP协议搭建去中心化的点对点分布式网络以形成服务器集群;
    确定模块,用于根据IP主机的性能和所运行任务量在所述服务器集群中确定主节点主机、从节点主机;
    建立模块,用于在所述主节点主机、从节点主机之间通过传输信道建立基于公私密钥对的互信关系;
    采集获取模块,用于通过所述主节点主机及根据所述互信关系采集监控指标值,根据所述监控指标值获取所述从节点主机的运行状态;
    判断模块,用于通过所述主节点主机判断所述运行状态是否异常;
    生成触发模块,用于若所述运行状态异常,则生成告警报文,并将所述告警报文触发至监控端。
  14. 根据权利要求13所述的服务器集群主机性能监控装置,其特征在于,所述确定模块包括:
    主机性能指标生成单元,用于根据IP主机的CPU和/或内存的大小生成主机性能指标;
    排序单元,用于根据主机性能指标和主机所运行任务量对所述服务器集群中的各IP主机进行排序并生成排序结果;
    确定单元,用于根据所述排序结果确定出主节点主机,除主节点主机外的其余节点为从节点主机。
  15. 根据权利要求13所述的服务器集群主机性能监控装置,其特征在于,所述建立模块包括:
    系统建立单元,用于在所述主节点主机中建立主机密钥生成系统,在所述从节点主机中建立从机密钥管理系统;
    密钥对生成单元,用于基于非对称加密算法,在所述主机密钥生成系统生成公私密钥对;
    密钥对分离单元,用于将所述主机密钥生成系统生成的公私密钥对分离,并存储所述公私密钥对中的私钥于主节点主机中;
    公钥上传单元,用于基于ssh协议或stp将所述公私密钥对中的公钥上传至服务器集群中各从机节点主机的从机密钥管理系统;
    通道建立单元,用于在所述从机密钥管理系统与主机密钥生成系统之间,基于dubbo协议、tcp协议、http协议中的任一协议建立传输通道,所述传输通道用于传输所述公钥并实现对所述私钥的解密,以建立互信关系。
  16. 根据权利要求15所述的服务器集群主机性能监控装置,其特征在于,所述密钥对生成单元包括:
    生成单元,用于在所述主节点主机的预设目录下生成关于所述主节点主机的公私密钥对;其中,所述公私密钥对中的公钥、私钥为字母,数字和符号的组合;
    保存单元,用于将所述公私密钥对中的公钥、私钥分别保存在预设隐藏路径下,并为所述从节点主机分配用户属组和对应的公钥访问权限。
  17. 根据权利要求116所述的服务器集群主机性能监控装置,其特征在于,所述保存单元通过所述主节点主机为所述从节点主机设置公钥访问权限,所述访问权限用于供所述从节点主机访问所述公钥。
  18. 根据权利要求13所述的服务器集群主机性能监控装置,其特征在于,所述采集获取模块包括:
    地址序列获取单元,用于通过所述主节点主机及根据所述互信关系获取从节点主机的IP地址序列并保存;
    监控指标值获取单元,用于基于所获取的从节点主机的IP地址序列采集所述服务器集群中从节点主机上主机性能项的监控指标值;
    判断单元,用于判断是否采集到每个从节点主机的监控指标值,当判断出采集到每个从节点的监控指标值时,根据所述监控指标值获取所述从节点主机的运行状态,所述从节点主机的运行状态为正常状态;当判断出未采集到每个所述从节点的监控指标值时,根据所述监控指标值获取所述从节点主机的运行状态,所述从节点主机的运行状态为异常状态。
  19. 一种电子设备,其特征在于,该电子设备包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现权利要求1-12中任一项所述的服务器集群主机性能监控方法中的步骤。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有服务器集群主机性能监控分析程序,所述基于服务器集群主机性能监控分析程序被处理器执行时,实现如权利要求1-12中任一项所述的服务器集群主机性能监控方法的步骤。
PCT/CN2019/117912 2019-09-17 2019-11-13 服务器集群主机性能监控方法、装置、设备及存储介质 WO2021051582A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910875135.5A CN110737566B (zh) 2019-09-17 2019-09-17 主机性能监控方法及装置、电子设备及存储介质
CN201910875135.5 2019-09-17

Publications (1)

Publication Number Publication Date
WO2021051582A1 true WO2021051582A1 (zh) 2021-03-25

Family

ID=69267946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117912 WO2021051582A1 (zh) 2019-09-17 2019-11-13 服务器集群主机性能监控方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110737566B (zh)
WO (1) WO2021051582A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590434A (zh) * 2021-06-20 2021-11-02 济南浪潮数据技术有限公司 一种集群告警方法、系统、设备以及介质
CN113687982A (zh) * 2021-08-20 2021-11-23 济南浪潮数据技术有限公司 一种异地容灾集群搭建方法、装置及相关设备
CN114500246A (zh) * 2022-02-15 2022-05-13 平安证券股份有限公司 网络连接状态监控方法、装置、计算机设备及存储介质
CN114553732A (zh) * 2022-03-08 2022-05-27 北京月新时代科技股份有限公司 一种基于设备自动化获取设备性能的技术
CN116737384A (zh) * 2023-06-21 2023-09-12 上海玫克生储能科技有限公司 电化学模型仿真计算的加速方法、存储介质及电子设备
CN116996324A (zh) * 2023-09-25 2023-11-03 广州芯泰通信技术有限公司 基于dci的服务器集群用防泄漏安全监管系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400733A (zh) * 2020-03-13 2020-07-10 中国电力科学研究院有限公司 一种用于嵌入式Linux系统的信息安全防护系统及方法
CN111506480B (zh) * 2020-04-23 2024-03-08 上海达梦数据库有限公司 集群中组件的状态检测方法、装置和系统
CN112422368A (zh) * 2020-11-18 2021-02-26 青岛以萨数据技术有限公司 基于clickhouse的数据库集群监控方法及系统
CN113344454A (zh) * 2021-07-05 2021-09-03 湖南快乐阳光互动娱乐传媒有限公司 一种压测数据的处理方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231245A (zh) * 2016-03-23 2017-10-03 阿里巴巴集团控股有限公司 上报监控日志的方法及装置、处理监控日志的方法及装置
US20180077232A1 (en) * 2016-09-14 2018-03-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and Device for Establishing Communication Connection
CN108600156A (zh) * 2018-03-07 2018-09-28 华为技术有限公司 一种服务器及安全认证方法
CN110213338A (zh) * 2019-05-09 2019-09-06 国家计算机网络与信息安全管理中心 一种基于加密运算的集群化加速计算方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571452B (zh) * 2012-02-20 2015-04-08 华为技术有限公司 多节点管理的方法和系统
US10158743B2 (en) * 2016-06-12 2018-12-18 International Business Machines Corporation Compute node cluster management
CN106357442A (zh) * 2016-09-13 2017-01-25 郑州云海信息技术有限公司 一种服务器集群监控方法及系统
CN108234170B (zh) * 2016-12-15 2021-06-22 北京神州泰岳软件股份有限公司 一种服务器集群的监控方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231245A (zh) * 2016-03-23 2017-10-03 阿里巴巴集团控股有限公司 上报监控日志的方法及装置、处理监控日志的方法及装置
US20180077232A1 (en) * 2016-09-14 2018-03-15 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and Device for Establishing Communication Connection
CN108600156A (zh) * 2018-03-07 2018-09-28 华为技术有限公司 一种服务器及安全认证方法
CN110213338A (zh) * 2019-05-09 2019-09-06 国家计算机网络与信息安全管理中心 一种基于加密运算的集群化加速计算方法及系统

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590434A (zh) * 2021-06-20 2021-11-02 济南浪潮数据技术有限公司 一种集群告警方法、系统、设备以及介质
CN113590434B (zh) * 2021-06-20 2023-12-22 济南浪潮数据技术有限公司 一种集群告警方法、系统、设备以及介质
CN113687982A (zh) * 2021-08-20 2021-11-23 济南浪潮数据技术有限公司 一种异地容灾集群搭建方法、装置及相关设备
CN113687982B (zh) * 2021-08-20 2024-02-09 济南浪潮数据技术有限公司 一种异地容灾集群搭建方法、装置及相关设备
CN114500246A (zh) * 2022-02-15 2022-05-13 平安证券股份有限公司 网络连接状态监控方法、装置、计算机设备及存储介质
CN114500246B (zh) * 2022-02-15 2023-09-01 平安证券股份有限公司 网络连接状态监控方法、装置、计算机设备及存储介质
CN114553732A (zh) * 2022-03-08 2022-05-27 北京月新时代科技股份有限公司 一种基于设备自动化获取设备性能的技术
CN116737384A (zh) * 2023-06-21 2023-09-12 上海玫克生储能科技有限公司 电化学模型仿真计算的加速方法、存储介质及电子设备
CN116737384B (zh) * 2023-06-21 2024-02-27 上海玫克生储能科技有限公司 电化学模型仿真计算的加速方法、存储介质及电子设备
CN116996324A (zh) * 2023-09-25 2023-11-03 广州芯泰通信技术有限公司 基于dci的服务器集群用防泄漏安全监管系统
CN116996324B (zh) * 2023-09-25 2023-12-29 广州芯泰通信技术有限公司 基于dci的服务器集群用防泄漏安全监管系统

Also Published As

Publication number Publication date
CN110737566A (zh) 2020-01-31
CN110737566B (zh) 2022-12-30

Similar Documents

Publication Publication Date Title
WO2021051582A1 (zh) 服务器集群主机性能监控方法、装置、设备及存储介质
CN111787073B (zh) 一种统一服务的限流熔断平台及其方法
WO2022126980A1 (zh) 一种数据传输方法、装置、终端及存储介质
CN111752795A (zh) 一种全流程监控报警平台及其方法
CN102842001B (zh) 一种基于u盘认证的计算机安全信息检测系统及方法
CN104520873A (zh) 用于保护和恢复虚拟机的系统和方法
CN110855699B (zh) 一种流量审计方法、装置、服务器及审计设备
CN110661748B (zh) 一种日志的加密方法、解密方法及装置
WO2021051581A1 (zh) 服务器集群文件同步方法及装置、电子设备及存储介质
CN109951479A (zh) 一种通信方法、设备及通信系统
WO2018120913A1 (zh) 一种获取证书、鉴权的方法及网络设备
WO2020252897A1 (zh) 全链路数据鉴权方法、装置、设备及存储介质
JP2016508353A (ja) ネットワークメタデータを処理する改良されたストリーミング方法およびシステム
Holtz et al. Building scalable distributed intrusion detection systems based on the mapreduce framework
CN110109769A (zh) 应用程序崩溃的安全监控方法、装置、设备及存储介质
CN115118705A (zh) 一种基于微服务的工业边缘管控平台
CN111698126A (zh) 信息监控方法、系统及计算机可读存储介质
CN112286911B (zh) 数据库管理方法及装置、设备、存储介质
CN103139201A (zh) 一种网络策略获取方法及数据中心交换机
CN110570197B (zh) 一种基于区块链的数据处理方法以及设备
CN106537962B (zh) 无线网络配置、接入和访问方法、装置及设备
US11595419B2 (en) Communication monitoring system, communication monitoring apparatus, and communication monitoring method
CN114189515B (zh) 基于sgx的服务器集群日志获取方法和装置
WO2023035690A1 (zh) 用于空调控制的方法、装置及空调
CN110347557A (zh) 节点资源监控方法、电子设备、介质及采集方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19945566

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19945566

Country of ref document: EP

Kind code of ref document: A1