WO2019041930A1 - Inspection method, device and system, computer apparatus, and storage medium - Google Patents

Inspection method, device and system, computer apparatus, and storage medium Download PDF

Info

Publication number
WO2019041930A1
WO2019041930A1 PCT/CN2018/089230 CN2018089230W WO2019041930A1 WO 2019041930 A1 WO2019041930 A1 WO 2019041930A1 CN 2018089230 W CN2018089230 W CN 2018089230W WO 2019041930 A1 WO2019041930 A1 WO 2019041930A1
Authority
WO
WIPO (PCT)
Prior art keywords
patrol
node
target
role
identifier
Prior art date
Application number
PCT/CN2018/089230
Other languages
French (fr)
Chinese (zh)
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 WO2019041930A1 publication Critical patent/WO2019041930A1/en

Links

Images

Classifications

    • 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/04Network management architectures or arrangements
    • H04L41/042Network management architectures or arrangements comprising distributed management centres cooperatively managing the network
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C1/00Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people
    • G07C1/20Checking timed patrols, e.g. of watchman
    • 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
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Definitions

  • the present application relates to a patrol inspection method, apparatus, system, computer device and storage medium.
  • a method of inspection includes:
  • a patrol device includes:
  • the patrol request receiving module is configured to receive a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
  • a target node acquiring module configured to acquire, according to the target role identifier, the corresponding target patrol node
  • the command sending module is configured to send a patrol command to the target patrol node, so that the patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  • a patrol inspection system includes:
  • An administrator node corresponding to the at least one cluster is configured to receive a patrol request sent by the terminal, where the patrol request carries a target role identifier, where the target role identifier is used to identify that the target patrol node is served in the cluster. a role, obtaining, according to the target role identifier, the target patrol node under the corresponding administrator node, and sending a patrol instruction to the target patrol node; and
  • the at least one patrolling node corresponding to the admin node is configured to receive a patrol command sent by the corresponding admin node when the patrolling node is the target patrol node, and execute according to the preset patrol operation set. The inspection operation is performed and the inspection result is obtained.
  • a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the one or more processors such that the one or more The processors perform the following steps:
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • FIG. 1 is an implementation environment diagram of a patrol inspection method provided in accordance with one or more embodiments.
  • FIG. 2 is a flow chart of a method of inspection in accordance with one or more embodiments.
  • 3 is a flow chart of a patrol inspection method in another embodiment.
  • FIG. 4 is a flow chart of a method of inspection in another embodiment.
  • Figure 5 is a flow chart of a method of inspection in another embodiment.
  • Figure 6 is a flow chart of a method of inspection in another embodiment.
  • FIG. 7 is a block diagram of a patrol device in accordance with one or more embodiments.
  • Figure 8 is a block diagram of a patrol device in another embodiment.
  • Figure 9 is a block diagram of a patrol device in another embodiment.
  • Figure 10 is a block diagram of a patrol device in another embodiment.
  • 11 is a block diagram of a patrol system in accordance with one or more embodiments.
  • Figure 12 is a block diagram of a computer device in accordance with one or more embodiments.
  • FIG. 1 is an implementation environment diagram of a patrol inspection method provided in an embodiment.
  • the implementation environment includes a terminal 110, a cluster 120, and a cluster 130.
  • Each cluster corresponds to an administrator node for receiving a patrol request, and one or more patrol nodes are provided under the administrator node.
  • the administrator node sends the inspection request to one or more inspected nodes that need to be inspected.
  • the administrator node 1 can send a patrol request to the patrol node A, the patrol node B, and the patrol node C.
  • the administrator node 2 can send a patrol request to the patrol node D, the patrol node E, and the patrol node F.
  • the user can select or input the target role identifier to be patrolled on the terminal, and then send a patrol request to the administrator node of the cluster.
  • the administrator node of the cluster obtains the corresponding target according to the target role identifier.
  • the patrol node sends a patrol command to the target patrol node. After receiving the patrol command, the patrol node performs a patrol operation according to the preset patrol operation set and outputs the patrol result.
  • the above-mentioned administrator node 1, the administrator node 2, and the inspected node may be independent physical servers or terminals, or may be multiple physical servers or terminals.
  • the terminal 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
  • a patrol method is provided, which may be applied to the administrator node, and may specifically include the following steps:
  • Step 202 Receive a patrol request, where the patrol request carries a target role identifier.
  • the inspection refers to acquiring one or more of the running status of the node and the environment information. In some embodiments, the inspection may further include changing information such as parameters of the node.
  • the role ID is used to identify the role that the inspected node plays in the cluster.
  • a cluster there may be one or more nodes that perform different functions, or nodes with different permissions or different capabilities, so the role of the node may be set according to one or more of the functions, performance, and permissions of the node.
  • the cluster may include a storage node for storing content, a monitoring node for monitoring the health of the storage node, and an object storage gateway node for accessing the storage node, so the role may be set for the node according to functions performed by the node in the cluster.
  • logo The role identifier can be represented by a character, and the inspection request can carry one or more target role identifiers.
  • Step 204 Acquire a corresponding target patrol node according to the target role identifier.
  • the relationship between the role identifier and the patrolled node is set in advance.
  • One patrol node may include one or more roles, and one role may also correspond to one or more patrol nodes. Therefore, the role identifier and the patrolled node may be It is a one-to-one correspondence, one-to-many or many-to-many correspondence.
  • the target role identifier is obtained, the matching role identifier is found according to the target role identifier, and the corresponding node to be inspected is the target node to be inspected.
  • the patrol request may further include a node identifier, and the administrator node sends the patrol request to the corresponding patrolled node according to the node identifier.
  • Step 206 Send a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  • the patrol command is used to indicate that the target is patrolled by the patrol node.
  • the patrol operation set is preset in the patrol node.
  • the patrol operation set includes one or more operations.
  • the patrol operation set may be specifically obtained according to the patrol operation set.
  • the inspection result is set.
  • the patrol operation set may be pre-set in the patrol node by means of a plug-in.
  • the patrol operation set may be a script generated by using a SQL statement or other compiled language.
  • the patrol check result can be obtained.
  • the patrol result includes at least one of the device information of the node and the service information, and may be, for example, one or more of the number of online users, the maximum number of connections, the remaining space of the device, and the CPU (Central Processing Unit) operating parameters. .
  • the patrol request further carries configuration parameters, and the configuration parameters are used to configure the patrol operation set.
  • a pre-configured patrol operation set can be a script that needs to pass parameters to execute, so executable scripts can be generated based on configuration parameters and pre-configured scripts.
  • the configuration parameters may be used to update the parameters in the pre-configured script, and the patrol operation may be performed according to the script after the parameter is updated, and the configuration parameters may be performed with the configuration parameters locally stored in the administrator node or the patrol node. Merge and then generate executable scripts with pre-configured scripts.
  • the patrol request carries the IP address of the reference node
  • the patrol command may also carry the IP address of the reference node.
  • the patrol command is used to enable the target patrol node to acquire the reference node according to the IP address, and perform time synchronization according to the time of the reference node.
  • the IP address can be used. The address is transmitted to the script corresponding to the time synchronization, so that the target patrol node can acquire the time of the reference node according to the IP address, and synchronize the time of the target patrol node according to the time of the reference node.
  • the target patrol node may send a time acquisition request to the reference node according to the IP address, and the reference node returns the time zone used by the reference node according to the time acquisition request, and the target patrol node adjusts the time according to the time zone adopted by the reference node, so that The time on the target node is consistent with the time of the reference node.
  • the patrol request may be sent by the client or may be triggered according to the set conditions. For example, it may be triggered according to the fault of the inspected node, or may be set to patrol the inspected node when the preset time, the preset duration or the amount of traffic is small. For example, it can be set to trigger a patrol request at one o'clock every night or when the traffic is less than a preset value.
  • each fault is set with a corresponding set of patrol operations, and thus, a corresponding set of patrol operations can be acquired according to the fault.
  • the corresponding patrol operation set includes an operation corresponding to acquiring CPU state information, an operation corresponding to obtaining a number of service connections, and the like. In this way, when a fault occurs, the inspection result can be obtained in time.
  • the set of patrol operations may be sent to the patrol node when the first patrol is performed. For example, you can set the patrol operation set corresponding to each cluster, or you can set the patrol operation set corresponding to each role.
  • the administrator node receives the patrol operation set sent by the terminal, and sends the patrol operation set to the corresponding patrol node.
  • the operations in the patrol operation set may be sorted according to the operation time, for example, the operation sequence of the operation time is performed after the operation time is short.
  • the patrol method may obtain a corresponding target patrol node according to the target role identifier, and then send a patrol command to the target patrol node, so that the target is patrolled node.
  • the patrol operation is automatically performed according to the preset patrol operation set, and the patrol result is obtained. Therefore, when the patrol request is required, the patrol request carries the target role identifier of the role of the patrol node in the cluster, and the patrol node of the corresponding role in the cluster can be patrolled without manual intervention.
  • Each patrol node performs a patrol operation, which saves inspection time and improves inspection efficiency. .
  • the patrol node includes one or more roles. As shown in FIG. 3, the step S206 is to send a patrol command to the target patrol node:
  • S302 Send a patrol command to the target patrol node, where the patrol command carries the target role identifier, so that the target patrol node obtains the corresponding patrol operation set according to the target role identifier to perform a patrol operation, and obtains a patrol result.
  • the target patrol node can have one or more roles, and each role has a corresponding patrol operation set.
  • the role may include an OSD (Object Storage Device) role, a monitoring role for monitoring the health of the OSD node, and at least one of an RGW (rados gateway) role.
  • the ping operation set corresponding to the OSD role may include an operation corresponding to checking the NTP (Network Time Protocol), obtaining an operation corresponding to the disk size information, obtaining an operation corresponding to the browsing file record, and obtaining an operation corresponding to the CPU information.
  • NTP Network Time Protocol
  • the patrol operation set corresponding to the monitoring role may include one of acquiring an operation corresponding to the monitoring process information, obtaining an operation corresponding to the NTP information, and acquiring an operation corresponding to the disk life.
  • the patrol operation set corresponding to the RGW role may include one or more operations of acquiring an operation corresponding to the error log and obtaining an operation corresponding to the RGW process information.
  • the corresponding relationship between the role identifier and the patrol operation set can be stored in the target patrol node. After receiving the target role identifier, the target patrol node acquires the corresponding patrol operation set according to the target role identifier.
  • the patrol method may further include the following steps:
  • the node role storage request sent by the patrol node is received, and the node role storage request carries the target role identifier and the target node identifier of the target patrol node.
  • the target node identifier is used to identify the target patrol node. After a new role is added to the target patrol node or a new node is added to the cluster, the target patrol node sends a node role storage request, and the administrator node receives the node role storage.
  • the request, the target role identifier carried by the node role storage request may include one or more.
  • the corresponding relationship between the target role identifier carried in the node role storage request and the target patrol node is set and stored.
  • the role of the node to be carried by the node role storage request is the RGW, indicating that the role of the target node is the RGW role, and the target of the inspection node is 001.
  • the RGW is associated with the 001. Therefore, when the patrol node with the role of the RGW is to be obtained, the target patrol node 001 can be obtained as the RGW role according to the corresponding relationship.
  • the patrol node sends the role identifier to the administrator node, so that when the node or the node is added to the role in the cluster, the patrol personnel are not required to collect and configure the specific patrol node information. Nodes with newly added nodes or newly added roles are patrolled, which further reduces the workload of the inspectors.
  • the patrol method may further include the following steps:
  • Step S502 Receive a patrol result sent by the patrol node.
  • the result of the patrol inspection may be sent by the patrol node during the patrol inspection process, or may be sent after the patrol inspection is completed. For example, after the target node performs an operation in the patrol operation set, the patrol node sends the patrol result corresponding to the operation to the administrator node. Alternatively, the inspection result is sent after the operations in the inspection operation set are completed.
  • Step S504 summarizing the inspection results according to at least one of the role of the target patrol node and the corresponding cluster to generate a patrol report.
  • a patrol report may be generated by summarizing the patrol results according to at least one of the role of the patrol node and the cluster corresponding to the target patrol node. For example, the inspection results of the same character are made into a table or a chart, and the same cluster and the same inspection target are compared, sorted, or labeled by the same inspection result.
  • the presentation form of the inspection report can be preset. For example, the inspection report can be displayed in the form of xml, or can be displayed by means of a chart or the like.
  • the administrator node can send a patrol report to the terminal for viewing by the user.
  • the patrol method may further include the following steps:
  • Step S602 receiving a patrol operation information update request, and the patrol operation information update request carries the change information and the target role identifier.
  • the change information refers to information that changes the operation of the inspection operation set.
  • the change information may include one or more of an operation instruction for deleting an operation of the inspection operation set, an operation instruction for increasing an operation of the inspection operation set, and an instruction for modifying an execution order of the operation of the operation centralized operation, or focusing on the inspection operation.
  • the parameters are updated with updated parameters and parameter names. For example, when the network address of the current reference node corresponding to the time synchronization operation is to be updated to the network address of the new reference node, the change parameter is the network address corresponding to the new reference node, and the parameter name is the time synchronization parameter.
  • Step S604 Acquire a corresponding target patrol node according to the target role identifier.
  • a matching role identifier is found according to the target role identifier, and the corresponding flagged node is the target node to be inspected.
  • step S606 the change information is sent to the target patrol node.
  • the change information is sent to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
  • the target role identifier may also be sent to the target patrol node, so that the target patrol node corresponds to the target role identifier according to the target role identifier.
  • the target inspection operation set is updated.
  • a patrol device which may be integrated into the administrator node, and may specifically include:
  • the patrol request receiving module 702 is configured to receive a patrol request, where the patrol request carries a target role identifier, and the target role identifier is used to identify a role that the target patrol node plays in the cluster;
  • the target node obtaining module 704 is configured to obtain a corresponding target patrol node according to the target role identifier
  • the command sending module 706 is configured to send a patrol command to the target patrol node, so that the patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  • the command sending module 706 is configured to: send a patrol command to the target patrol node, where the patrol command carries the target role identifier, so that the target patrol node obtains the corresponding target patrol according to the target role identifier.
  • the operation set performs a patrol operation to obtain a patrol result.
  • the patrol device further includes:
  • the storage request receiving module 802 is configured to receive a node role storage request sent by the target patrol node, where the node role storage request carries the target role identifier and the target node identifier of the target patrol node;
  • the relationship setting module 804 is configured to set and store a correspondence between the target role identifier and the target node identifier according to the node role storage request.
  • the patrol device further includes:
  • the result receiving module 902 is configured to receive a patrol result sent by the patrol node
  • the report generation module 904 is configured to collect the inspection report according to the role of the target patrol node and at least one of the corresponding clusters to generate a patrol report.
  • the patrol device further includes:
  • the update request receiving module 1002 is configured to receive a patrol operation information update request, where the patrol operation information update request carries the change information and the target role identifier;
  • the change information transmitting module 1006 is configured to send the change information to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
  • a patrol system including:
  • the administrator node 1102 corresponding to the cluster is configured to receive the patrol request sent by the terminal, where the patrol request carries the target role identifier, and the target role identifier is used to identify the role that the target patrol node plays in the cluster, and obtains the role according to the target role identifier.
  • the target under the corresponding administrator node is patrolled and sends a patrol command to the target patrol node.
  • the administrator node is the administrator node corresponding to the cluster.
  • the terminal sends a patrol request to the administrator node of the cluster, and the administrator node receives the patrol request sent by the terminal.
  • the terminal may further receive the cluster identifier selected by the user, obtain the target administrator node corresponding to the selected cluster identifier, and send a patrol request to the target administrator node.
  • the first patrol node 1104 corresponding to the administrator node 1102 is configured to receive a patrol command sent by the corresponding administrator node when the first patrol node 1104 is the target patrol node, according to the preset patrol inspection.
  • the operation set performs a patrol operation and obtains the inspection result.
  • the second patrol node 1106 corresponding to the administrator node 1102 is configured to receive a patrol command sent by the corresponding administrator node when the second patrol node 1106 is the target patrol node, according to the preset patrol inspection.
  • the operation set performs a patrol operation and obtains the inspection result.
  • the number of administrator nodes in FIG. 11 is only one example.
  • the above-mentioned inspection system may include one or more administrator nodes, and each administrator node corresponds to one or more inspections. node.
  • the embodiment of the present application does not limit the number of administrator nodes and the number of patrol nodes corresponding to the administrator node.
  • Each of the above-described inspection devices may be implemented in whole or in part by software, hardware, and combinations thereof.
  • Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • FIG. 12 it is an internal structural diagram of a computer device in an embodiment, the computer device is connected to a processor, a memory, and a network interface connected to the bus through a system.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions.
  • the internal memory provides an environment for operation of an operating system and computer readable instructions in a non-volatile storage medium.
  • the network interface of the computer device is used for communicating with an external terminal through a network connection, such as receiving a patrol request, sending a patrol command, and the like.
  • the computer readable instructions are executed by the processor to implement a patrol method.
  • FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
  • the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • the patrol device provided herein can be implemented in the form of a computer readable instruction that can be run on a computer device as shown in FIG. 12, non-volatile storage of the computer device
  • the medium may store various program modules constituting the patrol device, such as the patrol request receiving module 702, the target node obtaining module 704, and the command sending module 706 in FIG.
  • Each of the program modules includes computer readable instructions for causing the computer device to perform the steps in the patrol method of the various embodiments of the present application described in the specification, for example, the computer device can be as shown in FIG.
  • the patrol request receiving module 702 of the patrol device receives the patrol request, and the patrol request carries the target role identifier.
  • the target node acquiring module 704 acquires the corresponding target patrol node according to the target role identifier, and sends the patrol node 706 to The target is sent a patrol command by the patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and the patrol result is obtained.
  • a computer device comprising a memory and one or more processors, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the one or more processors to perform the step of: receiving a patrol request,
  • the patrol request carries the target role identifier, and the target role identifier is used to identify the role that the target patrol node plays in the cluster; the corresponding target patrol node is obtained according to the target role identifier; and the patrol node is sent to the target patrol node.
  • the inspection command is executed so that the target patrol node performs a patrol operation according to the preset patrol operation set, and the patrol result is obtained.
  • One or more non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: receiving a patrol request, patrolling The request carries the target role identifier, and the target role identifier is used to identify the role of the target patrol node in the cluster; the corresponding target patrol node is obtained according to the target role identifier; and the patrol command is sent to the target patrol node.
  • the patrol result is obtained.
  • the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, or a read-only memory (ROM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

An inspection method comprises: receiving an inspection request, the inspection request carrying a target role identifier used to indicate a role of a target node under inspection in a cluster; acquiring the corresponding target node according to the target role identifier; and transmitting an inspection instruction to the target node, such that the target node performs an inspection operation according to a preset inspection operation set, thereby obtaining an inspection result.

Description

巡检方法、装置、***、计算机设备和存储介质Inspection method, device, system, computer equipment and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年8月31日提交中国专利局,申请号为2017107738284,申请名称为“巡检方法、装置、***、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims to be submitted to the China Patent Office on August 31, 2017, the application number is 2017107738284, and the priority of the Chinese patent application entitled "patrol inspection method, device, system, computer equipment and storage medium" is adopted. The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及一种巡检方法、装置、***、计算机设备和存储介质。The present application relates to a patrol inspection method, apparatus, system, computer device and storage medium.
背景技术Background technique
随着科学技术的发展,越来越多的设备如服务器投入到使用中,以管理网络资源或者为用户提供相应的服务。为了能够发现设备的异常情况或者确认设备能够正常运行,需要对设备需要进行巡检。例如,当服务器上线后,为了确保服务器的正常运行,需要定时获取服务器的硬件信息、运行的各项服务的状态信息或者对服务器的信息进行变更。然而,目前巡检方式依靠于巡检人员到各个设备中查看设备的状态信息,然而这种巡检方式非常的耗费时间和精力,效率低下。With the development of science and technology, more and more devices such as servers are put into use to manage network resources or provide corresponding services for users. In order to be able to discover abnormal conditions of the device or to confirm that the device can operate normally, you need to patrol the device. For example, after the server is online, in order to ensure the normal operation of the server, it is necessary to periodically obtain the hardware information of the server, the status information of each service running, or change the information of the server. However, the current inspection method relies on the inspection personnel to view the status information of the equipment in each device. However, this inspection method is very time-consuming and inefficient, and inefficient.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种巡检方法、装置、***、计算机设备和存储介质。In accordance with various embodiments disclosed herein, a method, apparatus, system, computer device, and storage medium are provided.
一种巡检方法包括:A method of inspection includes:
接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
一种巡检装置包括:A patrol device includes:
巡检请求接收模块,用于接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;The patrol request receiving module is configured to receive a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
目标节点获取模块,用于根据所述目标角色标识获取对应的所述目标被巡检节点;及a target node acquiring module, configured to acquire, according to the target role identifier, the corresponding target patrol node; and
指令发送模块,用于向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。The command sending module is configured to send a patrol command to the target patrol node, so that the patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
一种巡检***包括:A patrol inspection system includes:
至少一个集群对应的管理员节点,用于接收终端发送的巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在所述集群中担任的角色,根据 所述目标角色标识获取对应的管理员节点下的所述目标被巡检节点,向所述目标被巡检节点发送巡检指令;及An administrator node corresponding to the at least one cluster is configured to receive a patrol request sent by the terminal, where the patrol request carries a target role identifier, where the target role identifier is used to identify that the target patrol node is served in the cluster. a role, obtaining, according to the target role identifier, the target patrol node under the corresponding administrator node, and sending a patrol instruction to the target patrol node; and
所述管理员节点对应的至少一个被巡检节点,用于当被巡检节点为目标被巡检节点时,接收对应的管理员节点发送的巡检指令,根据预设的巡检操作集执行巡检操作,得到巡检结果。The at least one patrolling node corresponding to the admin node is configured to receive a patrol command sent by the corresponding admin node when the patrolling node is the target patrol node, and execute according to the preset patrol operation set. The inspection operation is performed and the inspection result is obtained.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the one or more processors such that the one or more The processors perform the following steps:
接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features and advantages of the present invention will be apparent from the description, drawings and claims.
附图说明DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some embodiments of the present application, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为根据一个或多个实施例中提供的巡检方法的实施环境图。1 is an implementation environment diagram of a patrol inspection method provided in accordance with one or more embodiments.
图2为根据一个或多个实施例中巡检方法的流程图。2 is a flow chart of a method of inspection in accordance with one or more embodiments.
图3为另一个实施例中巡检方法的流程图。3 is a flow chart of a patrol inspection method in another embodiment.
图4为另一个实施例中巡检方法的流程图。4 is a flow chart of a method of inspection in another embodiment.
图5为另一个实施例中巡检方法的流程图。Figure 5 is a flow chart of a method of inspection in another embodiment.
图6为另一个实施例中巡检方法的流程图。Figure 6 is a flow chart of a method of inspection in another embodiment.
图7为根据一个或多个实施例中巡检装置的框图。7 is a block diagram of a patrol device in accordance with one or more embodiments.
图8为另一个实施例中巡检装置的框图。Figure 8 is a block diagram of a patrol device in another embodiment.
图9为另一个实施例中巡检装置的框图。Figure 9 is a block diagram of a patrol device in another embodiment.
图10为另一个实施例中巡检装置的框图。Figure 10 is a block diagram of a patrol device in another embodiment.
图11为根据一个或多个实施例中巡检***的框图。11 is a block diagram of a patrol system in accordance with one or more embodiments.
图12为根据一个或多个实施例中计算机设备的框图。Figure 12 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
图1为一个实施例中提供的巡检方法的实施环境图,如图1所示,在该实施环境中,包括终端110、集群120以及集群130。每个集群对应有用于接收巡检请求的管理员节点,管理员节点下设有一个或多个被巡检节点。管理员节点将巡检请求发送给一个或多个需要进行巡检的被巡检节点。例如,集群120中,管理员节点1可以将巡检请求发送给被巡检节点A、被巡检节点B以及被巡检节点C。集群130中,管理员节点2可以将巡检请求发送给被巡检节点D、被巡检节点E以及被巡检节点F。要巡检时,用户可以在终端上选择或输入要进行巡检的目标角色标识,然后发送巡检请求到集群的管理员节点中,由集群的管理员节点根据目标角色标识获取对应的目标被巡检节点,并向目标被巡检节点发送巡检指令,目标被巡检节点接收到巡检指令后,根据预设的巡检操作集执行巡检操作,并输出巡检结果。FIG. 1 is an implementation environment diagram of a patrol inspection method provided in an embodiment. As shown in FIG. 1 , the implementation environment includes a terminal 110, a cluster 120, and a cluster 130. Each cluster corresponds to an administrator node for receiving a patrol request, and one or more patrol nodes are provided under the administrator node. The administrator node sends the inspection request to one or more inspected nodes that need to be inspected. For example, in the cluster 120, the administrator node 1 can send a patrol request to the patrol node A, the patrol node B, and the patrol node C. In the cluster 130, the administrator node 2 can send a patrol request to the patrol node D, the patrol node E, and the patrol node F. To patrol, the user can select or input the target role identifier to be patrolled on the terminal, and then send a patrol request to the administrator node of the cluster. The administrator node of the cluster obtains the corresponding target according to the target role identifier. The patrol node sends a patrol command to the target patrol node. After receiving the patrol command, the patrol node performs a patrol operation according to the preset patrol operation set and outputs the patrol result.
上述的管理员节点1、管理员节点2以及被巡检节点可以是独立的物理服务器或终端,也可以是多个物理服务器或终端。终端110可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱以及智能手表等,但并不局限于此。The above-mentioned administrator node 1, the administrator node 2, and the inspected node may be independent physical servers or terminals, or may be multiple physical servers or terminals. The terminal 110 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto.
如图2所示,在一些实施例中,提出了一种巡检方法,该巡检方法可以应用于上述的管理员节点中,具体可以包括以下步骤:As shown in FIG. 2, in some embodiments, a patrol method is provided, which may be applied to the administrator node, and may specifically include the following steps:
步骤202,接收巡检请求,巡检请求携带有目标角色标识。Step 202: Receive a patrol request, where the patrol request carries a target role identifier.
巡检指获取节点的运行状况以及环境信息中的一种或多种,在一些实施例中巡检还可以包括对节点的参数等信息进行更改。角色标识用于标识被巡检节点在集群中担任的角色。在集群中,可以有一种或多种执行不同功能的节点,或者有不同权限或者不同性能的节点,因此可以根据节点的功能、性能以及权限中的一个或多个设置节点的角色。例如集群可以包括用于存储内容的存储节点、用于监控存储节点的运行状况的监控节点以及用于访问存储节点的对象存储网关节点,因此可以根据节点在集群中所执行的功能为节点设置角色标识。角色标识可以用字符进行表示,巡检请求中可以携带一个或多个目标角色标识。The inspection refers to acquiring one or more of the running status of the node and the environment information. In some embodiments, the inspection may further include changing information such as parameters of the node. The role ID is used to identify the role that the inspected node plays in the cluster. In a cluster, there may be one or more nodes that perform different functions, or nodes with different permissions or different capabilities, so the role of the node may be set according to one or more of the functions, performance, and permissions of the node. For example, the cluster may include a storage node for storing content, a monitoring node for monitoring the health of the storage node, and an object storage gateway node for accessing the storage node, so the role may be set for the node according to functions performed by the node in the cluster. Logo. The role identifier can be represented by a character, and the inspection request can carry one or more target role identifiers.
步骤204,根据目标角色标识获取对应的目标被巡检节点。Step 204: Acquire a corresponding target patrol node according to the target role identifier.
预先设置了角色标识与被巡检节点的对应关系,一个被巡检节点可以包括一个或多个角色,一个角色也可以对应一个或多个被巡检节点,因此角色标识与被巡检节点可以是一一对应、一对多或者多对多的对应关系。得到目标角色标识后,根据目标角色标识查找到匹配的角色标识,该角色标识对应的被巡检节点为目标被巡检节点。The relationship between the role identifier and the patrolled node is set in advance. One patrol node may include one or more roles, and one role may also correspond to one or more patrol nodes. Therefore, the role identifier and the patrolled node may be It is a one-to-one correspondence, one-to-many or many-to-many correspondence. After the target role identifier is obtained, the matching role identifier is found according to the target role identifier, and the corresponding node to be inspected is the target node to be inspected.
在一些实施例中,巡检请求中还可以包括节点标识,管理员节点根据节点标识将巡检请 求发送给对应的被巡检节点。In some embodiments, the patrol request may further include a node identifier, and the administrator node sends the patrol request to the corresponding patrolled node according to the node identifier.
步骤206,向目标被巡检节点发送巡检指令,以使目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Step 206: Send a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
巡检指令用于指示目标被巡检节点执行巡检操作,被巡检节点中预先设置有巡检操作集,巡检操作集包括一个或多个操作,巡检操作集具体可以根据要获取的巡检结果进行设置。巡检操作集可以以插件的方式预先设置在被巡检节点中,例如巡检操作集可以是利用SQL语句或者其它编译语言生成的脚本。目标被巡检节点根据巡检操作集执行巡检操作后可以得到巡检结果。巡检结果包括节点的设备信息以及服务信息中的至少一个,例如可以为在线用户数、最大连接数、设备剩余空间以及CPU(Central Processing Unit,中央处理器)运行参数中的一个或多个信息。The patrol command is used to indicate that the target is patrolled by the patrol node. The patrol operation set is preset in the patrol node. The patrol operation set includes one or more operations. The patrol operation set may be specifically obtained according to the patrol operation set. The inspection result is set. The patrol operation set may be pre-set in the patrol node by means of a plug-in. For example, the patrol operation set may be a script generated by using a SQL statement or other compiled language. After the patrol node performs the patrol operation according to the patrol operation set, the patrol check result can be obtained. The patrol result includes at least one of the device information of the node and the service information, and may be, for example, one or more of the number of online users, the maximum number of connections, the remaining space of the device, and the CPU (Central Processing Unit) operating parameters. .
在一些实施例中,巡检请求中还携带有配置参数,配置参数用于对巡检操作集进行配置。例如预先配置的巡检操作集可以是需要传递参数才能执行的脚本,因此可以根据配置参数与预先配置的脚本生成可执行脚本。或者也可以利用配置参数对预先配置的脚本中的参数进行更新,并根据更新参数后的脚本执行巡检操作,还可以将配置参数与管理员节点或者被巡检节点中本地存储的配置参数进行合并,然后与预先配置的脚本生成可执行脚本。In some embodiments, the patrol request further carries configuration parameters, and the configuration parameters are used to configure the patrol operation set. For example, a pre-configured patrol operation set can be a script that needs to pass parameters to execute, so executable scripts can be generated based on configuration parameters and pre-configured scripts. Alternatively, the configuration parameters may be used to update the parameters in the pre-configured script, and the patrol operation may be performed according to the script after the parameter is updated, and the configuration parameters may be performed with the configuration parameters locally stored in the administrator node or the patrol node. Merge and then generate executable scripts with pre-configured scripts.
在一些实施例中,当要根据参考节点的时间对目标被巡检节点的时间进行同步时,巡检请求中携带有参考节点的IP地址,巡检指令中也可以携带参考节点的IP地址,巡检指令用于使目标被巡检节点根据IP地址获取参考节点的时间,根据参考节点的时间进行时间同步,当目标被巡检节点接收到目标巡检指令以及IP地址后,可以将该IP地址传入时间同步对应的脚本中,使目标被巡检节点可以根据IP地址获取到参考节点的时间,并根据参考节点的时间对目标被巡检节点的时间进行同步。例如,目标被巡检节点可以根据IP地址向参考节点发送时间获取请求,参考节点根据时间获取请求返回参考节点所采用的时区,目标被巡检节点根据参考节点所采用的时区调整其时间,使得目标被巡检节点上的时间与参考节点的时间一致。In some embodiments, when the time of the target patrol node is to be synchronized according to the time of the reference node, the patrol request carries the IP address of the reference node, and the patrol command may also carry the IP address of the reference node. The patrol command is used to enable the target patrol node to acquire the reference node according to the IP address, and perform time synchronization according to the time of the reference node. After the target node is received by the patrol node and the IP address, the IP address can be used. The address is transmitted to the script corresponding to the time synchronization, so that the target patrol node can acquire the time of the reference node according to the IP address, and synchronize the time of the target patrol node according to the time of the reference node. For example, the target patrol node may send a time acquisition request to the reference node according to the IP address, and the reference node returns the time zone used by the reference node according to the time acquisition request, and the target patrol node adjusts the time according to the time zone adopted by the reference node, so that The time on the target node is consistent with the time of the reference node.
在一些实施例中,巡检请求可以是客户端发送的,也可以是根据设置的条件触发的。例如可以是根据被巡检节点的故障触发的,或者可以设置在预设时间、预设时长或者业务量少时对被巡检节点进行巡检。例如,可以设置在每天晚上凌晨一点或者当业务量小于预设值时触发巡检请求。In some embodiments, the patrol request may be sent by the client or may be triggered according to the set conditions. For example, it may be triggered according to the fault of the inspected node, or may be set to patrol the inspected node when the preset time, the preset duration or the amount of traffic is small. For example, it can be set to trigger a patrol request at one o'clock every night or when the traffic is less than a preset value.
在一些实施例中,每个故障设置有对应的巡检操作集,因此,可以根据故障获取对应的巡检操作集。例如,可以设置当被巡检节点响应慢时对应的巡检操作集包括获取CPU状态信息对应的操作、获取业务连接数对应的操作等等。这样,当发生故障时可以及时获取到巡检结果。In some embodiments, each fault is set with a corresponding set of patrol operations, and thus, a corresponding set of patrol operations can be acquired according to the fault. For example, it may be set that when the patrol node is slow to respond, the corresponding patrol operation set includes an operation corresponding to acquiring CPU state information, an operation corresponding to obtaining a number of service connections, and the like. In this way, when a fault occurs, the inspection result can be obtained in time.
在一些实施例中,巡检操作集可以是进行第一次巡检时发送给被巡检节点的。例如可以设置每个集群对应的巡检操作集,也可以设置每个角色对应的巡检操作集。第一次巡检时,管理员节点接收终端发送的巡检操作集,并将巡检操作集发送给对应的被巡检节点。In some embodiments, the set of patrol operations may be sent to the patrol node when the first patrol is performed. For example, you can set the patrol operation set corresponding to each cluster, or you can set the patrol operation set corresponding to each role. During the first inspection, the administrator node receives the patrol operation set sent by the terminal, and sends the patrol operation set to the corresponding patrol node.
在一些实施例中,巡检操作集中的操作可以按照操作时间进行排序,例如操作时间长的 操作的执行顺序在操作时间短的操作的后面。In some embodiments, the operations in the patrol operation set may be sorted according to the operation time, for example, the operation sequence of the operation time is performed after the operation time is short.
上述巡检方法,接收到携带有目标角色标识的巡检请求后,可以根据目标角色标识获取对应的目标被巡检节点,然后向目标被巡检节点发送巡检指令,使得目标被巡检节点根据预设的巡检操作集自动执行巡检操作,得到巡检结果。因此,在需要进行巡检时,在巡检请求中携带标识目标被巡检节点在集群中担任的角色的目标角色标识就可以对集群中对应角色的被巡检节点进行巡检,无需人工到各个被巡检节点执行巡检操作,节省了巡检时间,提高了巡检效率。。After receiving the patrol request carrying the target role identifier, the patrol method may obtain a corresponding target patrol node according to the target role identifier, and then send a patrol command to the target patrol node, so that the target is patrolled node. The patrol operation is automatically performed according to the preset patrol operation set, and the patrol result is obtained. Therefore, when the patrol request is required, the patrol request carries the target role identifier of the role of the patrol node in the cluster, and the patrol node of the corresponding role in the cluster can be patrolled without manual intervention. Each patrol node performs a patrol operation, which saves inspection time and improves inspection efficiency. .
在一些实施例中,被巡检节点包括一个或多个角色,如图3所示,步骤S206即向目标被巡检节点发送巡检指令的步骤包括:In some embodiments, the patrol node includes one or more roles. As shown in FIG. 3, the step S206 is to send a patrol command to the target patrol node:
S302,向目标被巡检节点发送巡检指令,巡检指令中携带目标角色标识,以使目标被巡检节点根据目标角色标识获取对应的巡检操作集进行巡检操作,得到巡检结果。S302: Send a patrol command to the target patrol node, where the patrol command carries the target role identifier, so that the target patrol node obtains the corresponding patrol operation set according to the target role identifier to perform a patrol operation, and obtains a patrol result.
目标被巡检节点可以有一个或多个角色,每个角色都有对应的巡检操作集。例如角色可以包括OSD(Object Storage Device,对象存储设备)角色、用于监控OSD节点的运行状况的监控角色,以及RGW(rados gateway,对象存储网关)角色中的至少一个。OSD角色对应的巡检操作集可以包括对NTP(Network Time Protocol、网络时间协议)进行检查对应的操作、获取磁盘大小信息对应的操作、获取浏览文件记录对应的操作以及获取CPU信息对应的操作中的一个或多个。监控角色对应的巡检操作集可以包括获取监控进程信息对应的操作、获取NTP信息对应的操作以及获取磁盘寿命对应的操作中的一个或多个。RGW角色对应的巡检操作集可以包括获取报错日志对应的操作以及获取RGW进程信息对应的操作中的一个或多个。目标被巡检节点中可以存储角色标识与巡检操作集的对应关系。当接收到目标角色标识后,目标被巡检节点根据目标角色标识获取对应的巡检操作集。The target patrol node can have one or more roles, and each role has a corresponding patrol operation set. For example, the role may include an OSD (Object Storage Device) role, a monitoring role for monitoring the health of the OSD node, and at least one of an RGW (rados gateway) role. The ping operation set corresponding to the OSD role may include an operation corresponding to checking the NTP (Network Time Protocol), obtaining an operation corresponding to the disk size information, obtaining an operation corresponding to the browsing file record, and obtaining an operation corresponding to the CPU information. One or more. The patrol operation set corresponding to the monitoring role may include one of acquiring an operation corresponding to the monitoring process information, obtaining an operation corresponding to the NTP information, and acquiring an operation corresponding to the disk life. The patrol operation set corresponding to the RGW role may include one or more operations of acquiring an operation corresponding to the error log and obtaining an operation corresponding to the RGW process information. The corresponding relationship between the role identifier and the patrol operation set can be stored in the target patrol node. After receiving the target role identifier, the target patrol node acquires the corresponding patrol operation set according to the target role identifier.
在一些实施例中,图4所示,巡检方法还可以包括以下步骤:In some embodiments, as shown in FIG. 4, the patrol method may further include the following steps:
S402,接收目标被巡检节点发送的节点角色存储请求,节点角色存储请求携带有目标被巡检节点的目标角色标识及目标节点标识。S402. The node role storage request sent by the patrol node is received, and the node role storage request carries the target role identifier and the target node identifier of the target patrol node.
目标节点标识用于标识目标被巡检节点,在目标被巡检节点添加了新角色或者集群中增加了新的节点后,目标被巡检节点发送节点角色存储请求,管理员节点接收节点角色存储请求,节点角色存储请求携带的目标角色标识可以包括一个或多个。The target node identifier is used to identify the target patrol node. After a new role is added to the target patrol node or a new node is added to the cluster, the target patrol node sends a node role storage request, and the administrator node receives the node role storage. The request, the target role identifier carried by the node role storage request may include one or more.
S404,根据节点角色存储请求设置目标角色标识与目标节点标识的对应关系并存储。S404. Set a correspondence between the target role identifier and the target node identifier according to the node role storage request and store the corresponding relationship.
当接收到节点角色存储请求后,设置节点角色存储请求中携带的目标角色标识与目标被巡检节点的对应关系并存储。举个实际的例子,假设节点角色存储请求携带的目标被巡检节点的角色标识为RGW,表示该目标被巡检节点的角色为RGW角色,目标被巡检节点的标识为001,则可以将RGW与001对应存储,因此当要获取角色为RGW的被巡检节点时,可以根据对应关系得到目标被巡检节点001为RGW角色。After receiving the node role storage request, the corresponding relationship between the target role identifier carried in the node role storage request and the target patrol node is set and stored. As a practical example, it is assumed that the role of the node to be carried by the node role storage request is the RGW, indicating that the role of the target node is the RGW role, and the target of the inspection node is 001. The RGW is associated with the 001. Therefore, when the patrol node with the role of the RGW is to be obtained, the target patrol node 001 can be obtained as the RGW role according to the corresponding relationship.
本申请实施例中,由被巡检节点向管理员节点发送角色标识,使得在集群中增加节点或者节点增加角色时,无需巡检人员收集并配置具体的被巡检节点信息也能够对集群上新增节点或者新增角色的节点进行巡检,进一步减少了巡检人员的工作量。In the embodiment of the present application, the patrol node sends the role identifier to the administrator node, so that when the node or the node is added to the role in the cluster, the patrol personnel are not required to collect and configure the specific patrol node information. Nodes with newly added nodes or newly added roles are patrolled, which further reduces the workload of the inspectors.
在一些实施例中,如图5所示,巡检方法还可以包括以下步骤:In some embodiments, as shown in FIG. 5, the patrol method may further include the following steps:
步骤S502,接收目标被巡检节点发送的巡检结果。Step S502: Receive a patrol result sent by the patrol node.
巡检结果可以是目标被巡检节点在巡检的过程中发送的,也可以是巡检完成后发送的。例如,目标被巡检节点执行完巡检操作集中的一个操作后向管理员节点发送该操作对应的巡检结果。或者,当巡检操作集中的操作都执行完毕后再发送巡检结果。The result of the patrol inspection may be sent by the patrol node during the patrol inspection process, or may be sent after the patrol inspection is completed. For example, after the target node performs an operation in the patrol operation set, the patrol node sends the patrol result corresponding to the operation to the administrator node. Alternatively, the inspection result is sent after the operations in the inspection operation set are completed.
步骤S504,根据目标被巡检节点的角色以及对应的集群中的至少一种对巡检结果进行汇总,生成巡检报告。Step S504, summarizing the inspection results according to at least one of the role of the target patrol node and the corresponding cluster to generate a patrol report.
可以根据目标被巡检节点的角色以及目标被巡检节点对应的集群中的至少一个对巡检结果进行汇总,生成巡检报告。例如,将同一角色的巡检结果制作成一个表格或者图表,将同一个集群以及同一角色的目标被巡检节点的同一巡检结果进行对比、排序或者标注等等。巡检报告的展现形式可以预先设置,例如巡检报告可以是以xml的方式展示,也可以通过图表等方式进行展示。A patrol report may be generated by summarizing the patrol results according to at least one of the role of the patrol node and the cluster corresponding to the target patrol node. For example, the inspection results of the same character are made into a table or a chart, and the same cluster and the same inspection target are compared, sorted, or labeled by the same inspection result. The presentation form of the inspection report can be preset. For example, the inspection report can be displayed in the form of xml, or can be displayed by means of a chart or the like.
在一些实施例中,管理员节点可以将巡检报告发送给终端中,以供用户查看。In some embodiments, the administrator node can send a patrol report to the terminal for viewing by the user.
在一些实施例中,如图6所示,巡检方法还可以包括以下步骤:In some embodiments, as shown in FIG. 6, the patrol method may further include the following steps:
步骤S602,接收巡检操作信息更新请求,巡检操作信息更新请求携带有变更信息以及目标角色标识。Step S602, receiving a patrol operation information update request, and the patrol operation information update request carries the change information and the target role identifier.
变更信息指对巡检操作集中的操作进行更改的信息。例如,变更信息可以包括删除巡检操作集中的操作的操作指令、增加巡检操作集中的操作的操作指令以及修改操作集中操作的执行顺序的指令中的一个或多个,或者对巡检操作集中的参数进行更新的更新参数以及参数名称。例如,要将时间同步操作对应的当前参考节点的网络地址更新为新的参考节点的网络地址时,变更参数为新的参考节点对应的网络地址,参数名称为时间同步参数。The change information refers to information that changes the operation of the inspection operation set. For example, the change information may include one or more of an operation instruction for deleting an operation of the inspection operation set, an operation instruction for increasing an operation of the inspection operation set, and an instruction for modifying an execution order of the operation of the operation centralized operation, or focusing on the inspection operation. The parameters are updated with updated parameters and parameter names. For example, when the network address of the current reference node corresponding to the time synchronization operation is to be updated to the network address of the new reference node, the change parameter is the network address corresponding to the new reference node, and the parameter name is the time synchronization parameter.
步骤S604,根据目标角色标识获取对应的目标被巡检节点。Step S604: Acquire a corresponding target patrol node according to the target role identifier.
根据目标角色标识查找到匹配的角色标识,该角色标识对应的被巡检节点为目标被巡检节点。A matching role identifier is found according to the target role identifier, and the corresponding flagged node is the target node to be inspected.
步骤S606,将变更信息发送给目标被巡检节点。In step S606, the change information is sent to the target patrol node.
获取对应的目标被巡检节点后,将变更信息发送给目标被巡检节点,以使目标被巡检节点根据变更信息对目标被巡检节点上的巡检操作集进行更新。After acquiring the corresponding target patrol node, the change information is sent to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
在一些实施例中,当目标被巡检节点包括一个或多个角色时,还可以将目标角色标识发送给目标被巡检节点,使目标被巡检节点根据目标角色标识对目标角色标识对应的目标巡检操作集进行更新。In some embodiments, when the target patrol node includes one or more roles, the target role identifier may also be sent to the target patrol node, so that the target patrol node corresponds to the target role identifier according to the target role identifier. The target inspection operation set is updated.
应该理解的是,虽然上述的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the above-described flowcharts are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least a portion of the steps of the above-described flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
如图7所示,在一些实施例中,提供了一种巡检装置,该巡检装置可以集成于上述的管理员节点中,具体可以包括:As shown in FIG. 7 , in some embodiments, a patrol device is provided, which may be integrated into the administrator node, and may specifically include:
巡检请求接收模块702,用于接收巡检请求,巡检请求携带有目标角色标识,目标角色标识用于标识目标被巡检节点在集群中担任的角色;The patrol request receiving module 702 is configured to receive a patrol request, where the patrol request carries a target role identifier, and the target role identifier is used to identify a role that the target patrol node plays in the cluster;
目标节点获取模块704,用于根据目标角色标识获取对应的目标被巡检节点;The target node obtaining module 704 is configured to obtain a corresponding target patrol node according to the target role identifier;
指令发送模块706,用于向目标被巡检节点发送巡检指令,以使目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。The command sending module 706 is configured to send a patrol command to the target patrol node, so that the patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
在一些实施例中,指令发送模块706用于:向目标被巡检节点发送巡检指令,巡检指令中携带目标角色标识,以使目标被巡检节点根据目标角色标识获取对应的目标巡检操作集进行巡检操作,得到巡检结果。In some embodiments, the command sending module 706 is configured to: send a patrol command to the target patrol node, where the patrol command carries the target role identifier, so that the target patrol node obtains the corresponding target patrol according to the target role identifier. The operation set performs a patrol operation to obtain a patrol result.
在一些实施例中,如图8所示,巡检装置还包括:In some embodiments, as shown in FIG. 8, the patrol device further includes:
存储请求接收模块802,用于接收目标被巡检节点发送的节点角色存储请求,节点角色存储请求携带有目标被巡检节点的目标角色标识及目标节点标识;The storage request receiving module 802 is configured to receive a node role storage request sent by the target patrol node, where the node role storage request carries the target role identifier and the target node identifier of the target patrol node;
关系设置模块804,用于根据节点角色存储请求设置目标角色标识与目标节点标识的对应关系并存储。The relationship setting module 804 is configured to set and store a correspondence between the target role identifier and the target node identifier according to the node role storage request.
在一些实施例中,如图9所示,巡检装置还包括:In some embodiments, as shown in FIG. 9, the patrol device further includes:
结果接收模块902,用于接收目标被巡检节点发送的巡检结果;The result receiving module 902 is configured to receive a patrol result sent by the patrol node;
报告生成模块904,用于根据目标被巡检节点的角色以及对应的集群中的至少一种对巡检结果进行汇总,生成巡检报告。The report generation module 904 is configured to collect the inspection report according to the role of the target patrol node and at least one of the corresponding clusters to generate a patrol report.
在一些实施例中,如图10所示,巡检装置还包括:In some embodiments, as shown in FIG. 10, the patrol device further includes:
更新请求接收模块1002,用于接收巡检操作信息更新请求,巡检操作信息更新请求携带有变更信息以及目标角色标识;The update request receiving module 1002 is configured to receive a patrol operation information update request, where the patrol operation information update request carries the change information and the target role identifier;
更新节点获取模块1004,用于根据目标角色标识获取对应的目标被巡检节点;An update node obtaining module 1004, configured to acquire a corresponding target patrol node according to the target role identifier;
变更信息发送模块1006,用于将变更信息发送给目标被巡检节点,以使目标被巡检节点根据变更信息对目标被巡检节点上的巡检操作集进行更新。The change information transmitting module 1006 is configured to send the change information to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
在一些实施例中,如图11所示,提供了一种巡检***,包括:In some embodiments, as shown in FIG. 11, a patrol system is provided, including:
集群对应的管理员节点1102,用于接收终端发送的巡检请求,巡检请求携带有目标角色标识,目标角色标识用于标识目标被巡检节点在集群中担任的角色,根据目标角色标识获取对应的管理员节点下的目标被巡检节点,向目标被巡检节点发送巡检指令。The administrator node 1102 corresponding to the cluster is configured to receive the patrol request sent by the terminal, where the patrol request carries the target role identifier, and the target role identifier is used to identify the role that the target patrol node plays in the cluster, and obtains the role according to the target role identifier. The target under the corresponding administrator node is patrolled and sends a patrol command to the target patrol node.
管理员节点为集群对应的管理员节点。当需要巡检时,终端向集群的管理员节点发送巡检请求,管理员节点接收终端发送的巡检请求。The administrator node is the administrator node corresponding to the cluster. When the patrol is required, the terminal sends a patrol request to the administrator node of the cluster, and the administrator node receives the patrol request sent by the terminal.
在一些实施例中,终端在发送巡检请求之前,还可以接收用户选择的集群标识,获取选择的集群标识对应的目标管理员节点,向目标管理员节点发送巡检请求。In some embodiments, before sending the patrol request, the terminal may further receive the cluster identifier selected by the user, obtain the target administrator node corresponding to the selected cluster identifier, and send a patrol request to the target administrator node.
管理员节点1102对应的第一被巡检节点1104,用于当第一被巡检节点1104为目标被巡检节点时,接收对应的管理员节点发送的巡检指令,根据预设的巡检操作集执行巡检操作,得到巡检结果。The first patrol node 1104 corresponding to the administrator node 1102 is configured to receive a patrol command sent by the corresponding administrator node when the first patrol node 1104 is the target patrol node, according to the preset patrol inspection. The operation set performs a patrol operation and obtains the inspection result.
管理员节点1102对应的第二被巡检节点1106,用于当第二被巡检节点1106为目标被巡检节点时,接收对应的管理员节点发送的巡检指令,根据预设的巡检操作集执行巡检操作,得到巡检结果。The second patrol node 1106 corresponding to the administrator node 1102 is configured to receive a patrol command sent by the corresponding administrator node when the second patrol node 1106 is the target patrol node, according to the preset patrol inspection. The operation set performs a patrol operation and obtains the inspection result.
需要说明的是,图11中管理员节点的个数仅为其中的一个示例,上述的巡检***可以包括一个或多个管理员节点,每个管理员节点对应有一个或多个被巡检节点。例如,可以有多个集群,每个集群下设有管理员节点。本申请实施例对管理员节点的数量以及管理员节点对应的巡检节点的数量不做限制。It should be noted that the number of administrator nodes in FIG. 11 is only one example. The above-mentioned inspection system may include one or more administrator nodes, and each administrator node corresponds to one or more inspections. node. For example, there can be multiple clusters with administrator nodes under each cluster. The embodiment of the present application does not limit the number of administrator nodes and the number of patrol nodes corresponding to the administrator node.
关于巡检装置的具体限定可以参见上文中对于巡检方法的限定,在此不再赘述。上述巡检装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the inspection device, reference may be made to the definition of the inspection method in the above, and details are not described herein again. Each of the above-described inspection devices may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
如图12所示,为一个实施例中计算机设备的内部结构图,该计算机设备通过***连接总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质以及内存储器。该非易失性存储介质存储有操作***、计算机可读指令。该内存储器为非易失性存储介质中的操作***和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信,如接收巡检请求、发送巡检指令等。该计算机可读指令被处理器执行时以实现一种巡检方法。As shown in FIG. 12, it is an internal structural diagram of a computer device in an embodiment, the computer device is connected to a processor, a memory, and a network interface connected to the bus through a system. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions. The internal memory provides an environment for operation of an operating system and computer readable instructions in a non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection, such as receiving a patrol request, sending a patrol command, and the like. The computer readable instructions are executed by the processor to implement a patrol method.
本领域技术人员可以理解,图12中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 12 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied. The specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
在一些实施例中,本申请提供的巡检装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图12所示的计算机设备上运行,计算机设备的非易失性存储介质可存储组成该巡检装置的各个程序模块,比如图7中的巡检请求接收模块702、目标节点获取模块704和指令发送模块706。各个程序模块中包括计算机可读指令,计算机可读指令用于使计算机设备执行本说明书中描述的本申请各个实施例的巡检方法中的步骤,例如,计算机设备可以通过如图7所示的巡检装置中的巡检请求接收模块702接收巡检请求,巡检请求携带有目标角色标识,通过目标节点获取模块704根据目标角色标识获取对应的目标被巡检节点,通过指令发送模块706向目标被巡检节点发送巡检指令,以使目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。In some embodiments, the patrol device provided herein can be implemented in the form of a computer readable instruction that can be run on a computer device as shown in FIG. 12, non-volatile storage of the computer device The medium may store various program modules constituting the patrol device, such as the patrol request receiving module 702, the target node obtaining module 704, and the command sending module 706 in FIG. Each of the program modules includes computer readable instructions for causing the computer device to perform the steps in the patrol method of the various embodiments of the present application described in the specification, for example, the computer device can be as shown in FIG. The patrol request receiving module 702 of the patrol device receives the patrol request, and the patrol request carries the target role identifier. The target node acquiring module 704 acquires the corresponding target patrol node according to the target role identifier, and sends the patrol node 706 to The target is sent a patrol command by the patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and the patrol result is obtained.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:接收巡检请求,巡检请求携带有目标角色标识,目标角色标识用于标识目标被巡检节点在集群中担任的角色;根据目标角色标识获取对应的目标被巡检节点;及,向目标被巡检节点发送巡检指令,以使目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。A computer device comprising a memory and one or more processors, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the one or more processors to perform the step of: receiving a patrol request, The patrol request carries the target role identifier, and the target role identifier is used to identify the role that the target patrol node plays in the cluster; the corresponding target patrol node is obtained according to the target role identifier; and the patrol node is sent to the target patrol node. The inspection command is executed so that the target patrol node performs a patrol operation according to the preset patrol operation set, and the patrol result is obtained.
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:接收巡检请求,巡检请求携带有目标 角色标识,目标角色标识用于标识目标被巡检节点在集群中担任的角色;根据目标角色标识获取对应的目标被巡检节点;及,向目标被巡检节点发送巡检指令,以使目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。One or more non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of: receiving a patrol request, patrolling The request carries the target role identifier, and the target role identifier is used to identify the role of the target patrol node in the cluster; the corresponding target patrol node is obtained according to the target role identifier; and the patrol command is sent to the target patrol node. In order to enable the target patrol node to perform a patrol operation according to the preset patrol operation set, the patrol result is obtained.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,该计算机可读指令可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by computer readable instructions, which can be stored in a computer readable storage medium. The program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, or a read-only memory (ROM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the claims. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种巡检方法,包括:A method of inspection, including:
    接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    接收所述目标被巡检节点发送的节点角色存储请求,所述节点角色存储请求携带有所述目标被巡检节点的目标角色标识及目标节点标识;Receiving a node role storage request sent by the patrol node, where the node role storage request carries a target role identifier and a target node identifier of the target patrol node;
    根据所述节点角色存储请求设置所述目标角色标识与所述目标节点标识的对应关系并存储。Corresponding relationship between the target role identifier and the target node identifier is set according to the node role storage request and stored.
  3. 根据权利要求1或2所述的方法,其特征在于,所述目标被巡检节点包括一个或多个角色,所述向所述目标被巡检节点发送巡检指令,包括:The method according to claim 1 or 2, wherein the target patrol node comprises one or more roles, and the sending the patrol command to the target by the patrol node comprises:
    向所述目标被巡检节点发送巡检指令,所述巡检指令中携带目标角色标识,以使所述目标被巡检节点根据所述目标角色标识获取对应的目标巡检操作集进行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, where the patrol command carries a target role identifier, so that the target patrol node obtains a corresponding target patrol operation set according to the target role identifier to perform patrol inspection. Operation, get the inspection result.
  4. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    接收所述目标被巡检节点发送的所述巡检结果;及Receiving the inspection result sent by the inspection node by the target; and
    根据所述目标被巡检节点的角色以及对应的集群中的至少一种对所述巡检结果进行汇总,生成巡检报告。A patrol report is generated by summarizing the patrol results according to at least one of the role of the patrol node and the corresponding cluster.
  5. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:
    接收巡检操作信息更新请求,所述巡检操作信息更新请求携带有变更信息以及所述目标角色标识;Receiving a patrol operation information update request, where the patrol operation information update request carries the change information and the target role identifier;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    将所述变更信息发送给所述目标被巡检节点,以使所述目标被巡检节点根据所述变更信息对所述目标被巡检节点上的巡检操作集进行更新。Sending the change information to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
  6. 根据权利要求1所述的方法,其特征在于,所述巡检请求中携带有参考节点的IP地址,所述巡检指令用于使所述目标被巡检节点根据所述IP地址获取所述参考节点的时间,根据所述参考节点的时间进行时间同步。The method according to claim 1, wherein the patrol request carries an IP address of a reference node, and the patrol command is used to enable the target patrol node to obtain the The time of the reference node is time synchronized according to the time of the reference node.
  7. 一种巡检装置,所述装置包括:A patrol device, the device comprising:
    巡检请求接收模块,用于接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;The patrol request receiving module is configured to receive a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
    目标节点获取模块,用于根据所述目标角色标识获取对应的所述目标被巡检节点;及a target node acquiring module, configured to acquire, according to the target role identifier, the corresponding target patrol node; and
    指令发送模块,用于向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。The command sending module is configured to send a patrol command to the target patrol node, so that the patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  8. 一种巡检***,包括:A patrol inspection system comprising:
    至少一个集群对应的管理员节点,用于接收终端发送的巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在所述集群中担任的角色,根据所述目标角色标识获取对应的管理员节点下的所述目标被巡检节点,向所述目标被巡检节点发送巡检指令;及An administrator node corresponding to the at least one cluster is configured to receive a patrol request sent by the terminal, where the patrol request carries a target role identifier, where the target role identifier is used to identify that the target patrol node is served in the cluster. a role, obtaining, according to the target role identifier, the target patrol node under the corresponding administrator node, and sending a patrol instruction to the target patrol node; and
    所述管理员节点对应的至少一个被巡检节点,用于当被巡检节点为目标被巡检节点时,接收对应的管理员节点发送的巡检指令,根据预设的巡检操作集执行巡检操作,得到巡检结果。The at least one patrolling node corresponding to the admin node is configured to receive a patrol command sent by the corresponding admin node when the patrolling node is the target patrol node, and execute according to the preset patrol operation set. The inspection operation is performed and the inspection result is obtained.
  9. 一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:A computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executed by the processor such that the one or more processors perform the following steps:
    接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  10. 根据权利要求9所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The computer apparatus according to claim 9, wherein said computer readable instructions are further executed by said processor to perform the following steps:
    接收所述目标被巡检节点发送的节点角色存储请求,所述节点角色存储请求携带有所述目标被巡检节点的目标角色标识及目标节点标识;Receiving a node role storage request sent by the patrol node, where the node role storage request carries a target role identifier and a target node identifier of the target patrol node;
    根据所述节点角色存储请求设置所述目标角色标识与所述目标节点标识的对应关系并存储。Corresponding relationship between the target role identifier and the target node identifier is set according to the node role storage request and stored.
  11. 根据权利要求9或10所述的计算机设备,其特征在于,所述目标被巡检节点包括一个或多个角色,所述处理器所执行的所述向所述目标被巡检节点发送巡检指令,包括:The computer device according to claim 9 or 10, wherein the target patrol node comprises one or more roles, and the performing by the processor is sent to the patrol node to send a patrol inspection. Instructions, including:
    向所述目标被巡检节点发送巡检指令,所述巡检指令中携带目标角色标识,以使所述目标被巡检节点根据所述目标角色标识获取对应的目标巡检操作集进行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, where the patrol command carries a target role identifier, so that the target patrol node obtains a corresponding target patrol operation set according to the target role identifier to perform patrol inspection. Operation, get the inspection result.
  12. 根据权利要求9所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The computer apparatus according to claim 9, wherein said computer readable instructions are further executed by said processor to perform the following steps:
    接收所述目标被巡检节点发送的所述巡检结果;及Receiving the inspection result sent by the inspection node by the target; and
    根据所述目标被巡检节点的角色以及对应的集群中的至少一种对所述巡检结果进行汇总,生成巡检报告。A patrol report is generated by summarizing the patrol results according to at least one of the role of the patrol node and the corresponding cluster.
  13. 根据权利要求9所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The computer apparatus according to claim 9, wherein said computer readable instructions are further executed by said processor to perform the following steps:
    接收巡检操作信息更新请求,所述巡检操作信息更新请求携带有变更信息以及所述目标角色标识;Receiving a patrol operation information update request, where the patrol operation information update request carries the change information and the target role identifier;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    将所述变更信息发送给所述目标被巡检节点,以使所述目标被巡检节点根据所述变更信息对所述目标被巡检节点上的巡检操作集进行更新。Sending the change information to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
  14. 根据权利要求9所述的计算机设备,其特征在于,所述巡检请求中携带有参考节点的IP地址,所述巡检指令用于使所述目标被巡检节点根据所述IP地址获取所述参考节点的时间,根据所述参考节点的时间进行时间同步。The computer device according to claim 9, wherein the patrol request carries an IP address of a reference node, and the patrol command is used to enable the target patrol node to acquire the queried node according to the IP address. The time of the reference node is time synchronized according to the time of the reference node.
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps:
    接收巡检请求,所述巡检请求携带有目标角色标识,所述目标角色标识用于标识目标被巡检节点在集群中担任的角色;Receiving a patrol request, where the patrol request carries a target role identifier, where the target role identifier is used to identify a role that the target patrol node plays in the cluster;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    向所述目标被巡检节点发送巡检指令,以使所述目标被巡检节点根据预设的巡检操作集执行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, so that the target patrol node performs a patrol operation according to the preset patrol operation set, and obtains a patrol result.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The computer apparatus according to claim 15, wherein said computer readable instructions are further executed by said processor to perform the following steps:
    接收所述目标被巡检节点发送的节点角色存储请求,所述节点角色存储请求携带有所述目标被巡检节点的目标角色标识及目标节点标识;Receiving a node role storage request sent by the patrol node, where the node role storage request carries a target role identifier and a target node identifier of the target patrol node;
    根据所述节点角色存储请求设置所述目标角色标识与所述目标节点标识的对应关系并存储。Corresponding relationship between the target role identifier and the target node identifier is set according to the node role storage request and stored.
  17. 根据权利要求15或16所述的存储介质,其特征在于,所述目标被巡检节点包括一个或多个角色,所述处理器所执行的所述向所述目标被巡检节点发送巡检指令,包括:The storage medium according to claim 15 or 16, wherein the target patrol node includes one or more roles, and the processor performs the patrol inspection to the target by the patrol node. Instructions, including:
    向所述目标被巡检节点发送巡检指令,所述巡检指令中携带目标角色标识,以使所述目标被巡检节点根据所述目标角色标识获取对应的目标巡检操作集进行巡检操作,得到巡检结果。Sending a patrol command to the target patrol node, where the patrol command carries a target role identifier, so that the target patrol node obtains a corresponding target patrol operation set according to the target role identifier to perform patrol inspection. Operation, get the inspection result.
  18. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium of claim 15 wherein said computer readable instructions, when executed by said processor, further perform the following steps:
    接收所述目标被巡检节点发送的所述巡检结果;及Receiving the inspection result sent by the inspection node by the target; and
    根据所述目标被巡检节点的角色以及对应的集群中的至少一种对所述巡检结果进行汇总,生成巡检报告。A patrol report is generated by summarizing the patrol results according to at least one of the role of the patrol node and the corresponding cluster.
  19. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium of claim 15 wherein said computer readable instructions, when executed by said processor, further perform the following steps:
    接收巡检操作信息更新请求,所述巡检操作信息更新请求携带有变更信息以及所述目标角色标识;Receiving a patrol operation information update request, where the patrol operation information update request carries the change information and the target role identifier;
    根据所述目标角色标识获取对应的所述目标被巡检节点;及Obtaining, according to the target role identifier, the corresponding target patrol node; and
    将所述变更信息发送给所述目标被巡检节点,以使所述目标被巡检节点根据所述变更信息对所述目标被巡检节点上的巡检操作集进行更新。Sending the change information to the target patrol node, so that the target patrol node updates the patrol operation set on the target patrol node according to the change information.
  20. 根据权利要求15所述的存储介质,其特征在于,所述巡检请求中携带有参考节点的 IP地址,所述巡检指令用于使所述目标被巡检节点根据所述IP地址获取所述参考节点的时间,根据所述参考节点的时间进行时间同步。The storage medium according to claim 15, wherein the patrol request carries an IP address of a reference node, and the patrol command is used to enable the target patrol node to acquire the queried node according to the IP address. The time of the reference node is time synchronized according to the time of the reference node.
PCT/CN2018/089230 2017-08-31 2018-05-31 Inspection method, device and system, computer apparatus, and storage medium WO2019041930A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710773828.4A CN107800565B (en) 2017-08-31 2017-08-31 Inspection method, inspection device, inspection system, computer equipment and storage medium
CN201710773828.4 2017-08-31

Publications (1)

Publication Number Publication Date
WO2019041930A1 true WO2019041930A1 (en) 2019-03-07

Family

ID=61532221

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089230 WO2019041930A1 (en) 2017-08-31 2018-05-31 Inspection method, device and system, computer apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN107800565B (en)
WO (1) WO2019041930A1 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107800565B (en) * 2017-08-31 2020-03-06 平安科技(深圳)有限公司 Inspection method, inspection device, inspection system, computer equipment and storage medium
CN108717738A (en) * 2018-05-18 2018-10-30 中电(莱州)新能源有限公司 A kind of intelligent polling method
CN108830389A (en) * 2018-06-07 2018-11-16 山东中创软件商用中间件股份有限公司 A kind of method and system of information system automatic detecting
CN111491002B (en) * 2019-01-29 2023-12-05 杭州海康威视***技术有限公司 Equipment inspection method, device, inspected equipment, inspection server and system
CN110502400A (en) * 2019-08-23 2019-11-26 北京市燃气集团有限责任公司 Database method for inspecting and device
CN110636124B (en) * 2019-09-17 2022-07-08 平安科技(深圳)有限公司 VPP cluster management method and device, electronic equipment and storage medium
CN113132174A (en) * 2019-12-31 2021-07-16 阿里巴巴集团控股有限公司 Network equipment inspection system, method, equipment and storage medium
CN111901204B (en) * 2020-08-06 2022-09-02 银联商务股份有限公司 Cloud network inspection method, device and system
CN112348462B (en) * 2020-10-29 2024-07-19 岭东核电有限公司 Process processing method, apparatus, computer device, and storage medium
CN113472577B (en) * 2021-06-30 2023-07-25 济南浪潮数据技术有限公司 Cluster inspection method, device and system
CN114281580B (en) * 2021-11-30 2024-05-31 苏州浪潮智能科技有限公司 Method and system for carrying out inspection on HBase cluster network time
CN114723077A (en) * 2022-03-04 2022-07-08 贵州电网有限责任公司 Intelligent inspection method and system for transformer substation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262372A (en) * 2008-04-15 2008-09-10 北京华纬讯电信技术有限公司 Method for video monitoring platform to operate and control front-end device based on SIP server cluster
US20110142207A1 (en) * 2009-12-15 2011-06-16 Alcatel-Lucent Usa Inc. Method and apparatus for notifying emergency response organization of emergency message cluster
CN103079219A (en) * 2011-10-26 2013-05-01 艾默生网络能源有限公司 Base station automatic inspection digital management system and method
CN107800565A (en) * 2017-08-31 2018-03-13 平安科技(深圳)有限公司 Method for inspecting, device, system, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799791A (en) * 2010-02-08 2010-08-11 成都市华为赛门铁克科技有限公司 Equipment routing inspection method and device
CN103095475B (en) * 2011-10-31 2018-06-22 中兴通讯股份有限公司 The method for inspecting and system of multimode communication device
CN105872068A (en) * 2016-04-28 2016-08-17 国网浙江省电力公司信息通信分公司 Cloud platform and automatic operation check method based on same
CN106294067B (en) * 2016-08-01 2018-11-30 北京天云融创软件技术有限公司 A kind of virtualization system Self management method for inspecting based on P2P technology
CN106776185A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Computer equipment hardware method for inspecting and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262372A (en) * 2008-04-15 2008-09-10 北京华纬讯电信技术有限公司 Method for video monitoring platform to operate and control front-end device based on SIP server cluster
US20110142207A1 (en) * 2009-12-15 2011-06-16 Alcatel-Lucent Usa Inc. Method and apparatus for notifying emergency response organization of emergency message cluster
CN103079219A (en) * 2011-10-26 2013-05-01 艾默生网络能源有限公司 Base station automatic inspection digital management system and method
CN107800565A (en) * 2017-08-31 2018-03-13 平安科技(深圳)有限公司 Method for inspecting, device, system, computer equipment and storage medium

Also Published As

Publication number Publication date
CN107800565A (en) 2018-03-13
CN107800565B (en) 2020-03-06

Similar Documents

Publication Publication Date Title
WO2019041930A1 (en) Inspection method, device and system, computer apparatus, and storage medium
WO2017092347A1 (en) Method, device and system for updating client configuration in memcached system
US9270521B2 (en) Provisioning and managing a cluster deployed on a cloud
US9596279B2 (en) Cloud-based streaming data receiver and persister
US20210004270A1 (en) Scalable centralized internet-of-things manager
CN111800443B (en) Data processing system and method, device and electronic equipment
JP6325001B2 (en) Method and system using recursive event listeners in nodes of hierarchical data structures
US11223680B2 (en) Computer servers for datacenter management
WO2017092348A1 (en) Updating method, configuration and system for key-value pair database of client terminal
CN110166562B (en) Data synchronization method and device, storage medium and electronic equipment
US11636016B2 (en) Cloud simulation and validation system
CN112860479A (en) Data storage method and cloud data center
WO2022127504A1 (en) Network element management method and apparatus, and storage medium
WO2019109274A1 (en) Cloud service configuration method and apparatus, storage medium, and cloud service system
US10659289B2 (en) System and method for event processing order guarantee
CN112579353A (en) Automatic operation and maintenance method and device and big data platform
WO2016074412A1 (en) Compatibility administration method based on network configuration protocol, storage medium and device
JP2012195699A (en) Verification device, verification method, and verification program
WO2024045646A1 (en) Method, apparatus and system for managing cluster access permission
EP3306471A1 (en) Automatic server cluster discovery
CN113434384B (en) Pressure testing method and device
CN110768855B (en) Method and device for testing linkmzation performance
US8832242B2 (en) Determining a network address for managed devices to use to communicate with manager server in response to a change in a currently used network address
CN109271310B (en) Development testing method and device for network function of mobile application program
US20200244525A1 (en) System and method for device configuration update

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: 18852168

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18852168

Country of ref document: EP

Kind code of ref document: A1