Nothing Special   »   [go: up one dir, main page]

CN115604077A - Monitoring method, device, equipment and medium - Google Patents

Monitoring method, device, equipment and medium Download PDF

Info

Publication number
CN115604077A
CN115604077A CN202211193476.2A CN202211193476A CN115604077A CN 115604077 A CN115604077 A CN 115604077A CN 202211193476 A CN202211193476 A CN 202211193476A CN 115604077 A CN115604077 A CN 115604077A
Authority
CN
China
Prior art keywords
node
child node
state
file transmission
asynchronous file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211193476.2A
Other languages
Chinese (zh)
Inventor
吴千
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211193476.2A priority Critical patent/CN115604077A/en
Publication of CN115604077A publication Critical patent/CN115604077A/en
Pending legal-status Critical Current

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/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to the field of data analysis, in particular to a monitoring method, a monitoring device, monitoring equipment and a monitoring medium, which are used for improving the timeliness of node monitoring. The method periodically acquires a cluster self-checking information table from a database; determining the command channel state of each child node in the cluster and the asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission; generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node; and sending the node state table to the terminal so that the terminal processes the abnormal node based on the node state table. According to the method and the device, the cluster self-checking information table is set, so that a plurality of nodes can be monitored simultaneously, whether to give an alarm or not is determined according to the states of the nodes, and the timeliness of monitoring the nodes is improved.

Description

Monitoring method, device, equipment and medium
Technical Field
The present application relates to the field of data analysis technologies, and in particular, to a monitoring method, apparatus, device, and medium.
Background
Data processing systems generally have asynchronous data file transmission requirements, so that data file interaction is realized by installing a file transmission component client. At present, the alarm monitoring mode of asynchronous data file transmission is that a single node writes a script by itself to alarm, and the situations of no alarm, false alarm and late alarm often occur, so that the situation of active discovery and timely emergency disposal cannot be caused.
Disclosure of Invention
The embodiment of the application provides a monitoring method, a monitoring device, monitoring equipment and a monitoring medium, which are used for improving the timeliness of node monitoring.
In a first aspect, an embodiment of the present application provides a monitoring method, where the method includes:
periodically acquiring a cluster self-checking information table from a database;
determining a command channel state of each child node in the cluster and an asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission;
generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
and sending the node state table to a terminal so that the terminal processes abnormal nodes based on the node state table.
According to the method and the device, the cluster self-checking information table is set, the plurality of nodes are monitored simultaneously, whether to alarm is determined according to the states of the nodes, and the timeliness of monitoring the nodes is improved.
In some possible embodiments, for each child node, the command channel status of the child node is determined by:
controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
if a first reply message sent by the command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
and if the first reply message sent by the command channel port is not received within the first preset time length, determining that the command channel state of the child node is an abnormal state.
In the application, the self-checking of the command channel state of each child node is realized by sending the first self-checking message, and the command channel state of each child node is accurately monitored.
In some possible embodiments, for each child node, the asynchronous file transfer channel status of the child node is determined by:
periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
if a second reply message sent by the target asynchronous file transmission channel port is received within a second preset time length, determining that the target asynchronous file transmission channel state of the child node is a normal state;
and if the second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time length, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
In the application, by setting the second self-checking message, the self-checking of the asynchronous file transmission channel of each child node is realized, and the state of accurately monitoring the asynchronous file transmission channel of each child node is ensured.
In some possible embodiments, the target asynchronous file transfer channel port is determined by:
controlling the child node to establish connection with a target node; wherein the target node is a server-side node in communication with the cluster to which the child node belongs;
receiving a target port identifier sent by the target node;
and taking the asynchronous file transmission channel port indicated by the target port identification as the target asynchronous file transmission channel port.
In the application, by determining the target asynchronous file transmission channel port, the resource waste caused by traversing all the asynchronous file transmission channel ports is avoided.
In some possible embodiments, after generating the node state table based on the command channel state and the asynchronous file transfer channel state of each child node, the method further includes:
traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes;
if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the main node is abnormal, generating a main node abnormal notification, and sending the main node abnormal notification to the terminal.
In the embodiment of the application, the state of the main node is accurately monitored by the command channel state and the asynchronous file transmission channel state of each child node.
In a second aspect, the present application provides a monitoring device, the device comprising:
the acquisition module is used for periodically acquiring a cluster self-checking information table from a database;
the state determining module is used for determining the command channel state of each child node in the cluster and the asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission;
the generating module is used for generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
and the sending module is used for sending the node state table to a terminal so that the terminal can process abnormal nodes based on the node state table.
In some possible embodiments, for each child node, the command channel status of the child node is determined by:
controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
if a first reply message sent by the command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
and if the first reply message sent by the command channel port is not received within the first preset time length, determining that the command channel state of the child node is an abnormal state.
In some possible embodiments, for each child node, the asynchronous file transfer channel status of the child node is determined by:
periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
if a second reply message sent by the target asynchronous file transmission channel port is received within a second preset time length, determining that the target asynchronous file transmission channel state of the child node is a normal state;
and if a second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
In some possible embodiments, the target asynchronous file transfer channel port is determined by:
controlling the child node to establish connection with a target node; wherein the target node is a server-side node in communication with the cluster to which the child node belongs;
receiving a target port identifier sent by the target node;
and taking the asynchronous file transmission channel port indicated by the target port identification as the target asynchronous file transmission channel port.
In some possible embodiments, the generating module is executed on the command channel status and the asynchronous file transfer channel status of each child node, and after generating the node status table, the generating module is further configured to:
traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes;
if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the main node is abnormal, generating a main node abnormal notification, and sending the main node abnormal notification to the terminal.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps comprised in the method of any one of the first aspect according to the obtained program instructions.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a schematic view of an application scenario of a monitoring method according to an embodiment of the present application;
fig. 2 is a schematic overall flow chart of a monitoring method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a monitoring method for determining a status of a node command channel according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a monitoring method for determining a state of an asynchronous file transmission channel of a node according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a monitoring method determining a target asynchronous file transfer channel port of a node according to an embodiment of the present application;
fig. 6 is a schematic flowchart illustrating a monitoring method for determining whether a master node is abnormal according to an embodiment of the present application;
fig. 7 is a schematic diagram of a monitoring method apparatus according to an embodiment of the present application;
fig. 8 is a schematic view of an electronic device of a monitoring method according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the technical solutions in the embodiments of the present application will be described below clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The "plurality" in the present application may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
In the technical scheme, the data acquisition, transmission, use and the like all meet the requirements of relevant national laws and regulations.
Before describing a monitoring method provided in the embodiments of the present application, for ease of understanding, the following detailed description of the technical background of the embodiments of the present application is provided.
Data processing systems generally have asynchronous data file transmission requirements, so that data file interaction is realized by installing a file transmission component client. At present, the alarm monitoring mode of asynchronous data file transmission is that a single node writes a script by itself to alarm, and the situations of no alarm, false alarm and late alarm often occur, so that active discovery and timely emergency disposal cannot be realized.
In view of the above, the present application provides a monitoring method, an apparatus, an electronic device and a storage medium, which are used to solve the above problems. The inventive concept of the present application can be summarized as follows: periodically acquiring a cluster self-checking information table from a database; determining the command channel state of each child node in the cluster and the asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally transmits the asynchronous file; generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node; and sending the node state table to the terminal so that the terminal processes the abnormal node based on the node state table.
To facilitate understanding of the monitoring method provided in the embodiment of the present application, the following describes a monitoring method provided in the embodiment of the present application with reference to the accompanying drawings:
fig. 1 is a view of an application scenario of a monitoring method in the embodiment of the present application. The figure includes: a main node 10, a database 20, and a child node 30; wherein:
the main node 10 periodically obtains a cluster self-checking information table from the database 20; determining the command channel state of each child node 30 in the cluster and the asynchronous file transmission channel state of each child node 30 based on the cluster self-checking information table; the command channel state is used to determine whether the corresponding child node 30 normally receives and processes the command, and the asynchronous file transfer channel state is used to determine whether the corresponding child node 30 normally performs asynchronous file transfer; generating a node status table based on the command channel status and the asynchronous file transfer channel status of each child node 30; and sending the node state table to the terminal so that the terminal processes the abnormal node based on the node state table.
The description in this application is detailed in terms of only a single master node 10, database 20, sub-node 30, but it will be understood by those skilled in the art that the illustrated master node 10, database 20, sub-node 30 are intended to represent the operations of the master node 10, database 20, sub-node 30 that are involved in the technical aspects of the present application. And not to imply a limitation on the number, type, or location of the master nodes 10, databases 20, child nodes 30, etc. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments. In addition, as will be understood by those skilled in the art, the above data transmission and reception also need to be realized through a network.
It should be noted that the database in the embodiment of the present application may be, for example, a cache system, or may also be a hard disk storage, a memory storage, and the like. In addition, the monitoring method provided by the application is not only suitable for the application scenario shown in fig. 1, but also suitable for any device with monitoring requirements.
As shown in fig. 2, an overall flow diagram of a monitoring method provided in the embodiment of the present application is shown, where:
in step 201: periodically acquiring a cluster self-checking information table from a database;
in step 202: determining the command channel state of each child node in the cluster and the asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally transmits the asynchronous file;
in step 203: generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
in step 204: and sending the node state table to the terminal so that the terminal processes the abnormal node based on the node state table.
According to the method and the device, the cluster self-checking information table is set, the plurality of nodes are monitored simultaneously, whether to alarm is determined according to the states of the nodes, and the timeliness of monitoring the nodes is improved.
To facilitate further understanding of a monitoring method provided by the embodiment of the present application, the following steps in fig. 2 are described in detail according to the execution sequence of the embodiment of the present application:
first, a cluster self-inspection information table provided in the embodiment of the present application is explained, as shown in table 1, which is a schematic table of field names, lengths of each field, and functions of each field:
Figure BDA0003869903540000081
TABLE 1
In the embodiment of the present application, in order to determine the command channel state and the asynchronous file transmission channel state of each node in time, and further determine an abnormal node according to the state of the node, a field value of a target field needs to be periodically obtained from a cluster self-inspection information table, as shown in table 2, the cluster self-inspection information table provided in the embodiment of the present application includes:
Figure BDA0003869903540000082
Figure BDA0003869903540000091
TABLE 2
Since all nodes in the cluster share one cluster self-checking information table, in the present application, the state of each task is determined based on the node identification field, the field value of the node command channel state field corresponding to the node, and the field value of the node asynchronous file transmission channel state field, and can be implemented as follows: for each node, determining the sequence of the field values corresponding to the identity identification fields of the node in the field values corresponding to the identity identification fields; and taking the state represented by the field value in the sequence as the state of the command channel of the node in the field values corresponding to the state field of the command channel of the node.
For example: as shown in table 2, the node identifier includes six child nodes, wherein the sequence of the field values of the identifier corresponding to the child node 3 in the field values corresponding to the identifier field is the third, so that the state represented by the third field value "0" in the field values corresponding to the node command channel state field is used as the state corresponding to the command channel of the child node 3.
In the application, 1 is adopted to represent the command channel state of the node and the asynchronous file transmission channel state as a normal state, and 0 is adopted to represent the command channel state of the node and the asynchronous file transmission channel state as an abnormal state. It should be understood that this application is only given as an example, and in a specific implementation, other identifiers may be used to characterize the command channel status of the node and the asynchronous file transfer channel status, which is not limited in this application.
In some possible embodiments, for each child node, the command channel status of each child node may be determined using the method shown in fig. 3, where:
in step 301: controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
in step 302: if a first reply message sent by a command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
in step 303: and if the first reply message sent by the command channel port is not received within the first preset time length, determining that the command channel state of the child node is an abnormal state.
For example: if the command channel port corresponding to the node a is the port a, the master node controls the node a to periodically send a first self-check message to the port a, and the set first duration is 0.5 seconds, and if the first reply message sent by the port a is received within 0.5 seconds, the command channel state of the node a is determined to be a normal state, otherwise, the command channel state of the node a is determined to be an abnormal state.
It should be noted that, in the embodiment of the present application, a period in which the master node queries the cluster self-inspection information table may be the same as or different from a period in which the child node sends the first self-inspection packet.
In the application, the self-checking of the command channel state of each child node is realized by sending the first self-checking message, and the command channel state of each child node is accurately monitored.
In other possible embodiments, for each child node, the asynchronous file transfer channel status of each child node may be determined using the method shown in fig. 4, where:
in step 401: periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
in this application, considering that there are a plurality of asynchronous file transmission channel ports corresponding to each child node, in order to save resources consumed in the child node self-checking process, in this embodiment of the application, a target asynchronous file transmission channel port corresponding to each child node may be determined through the steps shown in fig. 5, where:
in step 501: the control child node establishes connection with the target node; the target node is a service end node which communicates with the cluster to which the child node belongs;
in step 502: receiving a target port identifier sent by a target node;
in step 503: and taking the asynchronous file transmission channel port indicated by the target port identification as a target asynchronous file transmission channel port.
For example: for the child node a, there are 100 asynchronous file transmission channel ports corresponding to the child node a, and if the asynchronous file transmission channel port indicated by the target port identifier sent by the target node is the 5 th asynchronous file transmission channel port, the 5 th asynchronous file transmission channel port is taken as the target asynchronous file transmission channel port.
In the application, by determining the target asynchronous file transmission channel port, the waste of resources caused by traversing all the asynchronous file transmission channel ports is avoided.
In step 402: if a second reply message sent by the port of the target asynchronous file transmission channel is received within a second preset time length, determining that the state of the target asynchronous file transmission channel of the child node is a normal state;
in step 403: and if the second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time length, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
For example: if the port of the target asynchronous file transmission channel corresponding to the node a is the port 5, the master node controls the node a to periodically send a second self-check message to the port 5, and the set second duration is 0.5 second, the first reply message sent by the port 5 is received within 0.5 second, the state of the target asynchronous file transmission channel of the node a is determined to be a normal state, otherwise, the state of the target asynchronous file transmission channel of the node a is determined to be an abnormal state.
It should be noted that, in the embodiment of the present application, a period in which the master node queries the cluster self-inspection information table may be the same as or different from a period in which the child node sends the second self-inspection packet.
In some possible embodiments, the master node may fail, and in the present application, in order to facilitate timely discovery and processing of the failure of the node, it may be determined whether the master node fails through the steps shown in fig. 6, where:
in step 601: traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes;
in step 602: if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the master node is abnormal;
in step 603: and generating a main node abnormity notification and sending the main node abnormity notification to the terminal.
For example: the node state table is shown in table 3:
Figure BDA0003869903540000111
Figure BDA0003869903540000121
TABLE 3
And traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes, determining that the command channel states of all the child nodes are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the master node is abnormal, and generating a master node abnormal notification.
In the embodiment of the application, the state of the main node is accurately monitored by the command channel state and the asynchronous file transmission channel state of each child node.
As shown in fig. 7, based on the same inventive concept, a monitoring apparatus 700 is proposed, which includes:
an obtaining module 7001, configured to periodically obtain a cluster self-inspection information table from a database;
a state determining module 7002, configured to determine, based on the cluster self-inspection information table, a command channel state of each child node in the cluster and an asynchronous file transmission channel state of each child node; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission;
a generating module 7003, configured to generate a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
a sending module 7004, configured to send the node state table to a terminal, so that the terminal processes an abnormal node based on the node state table.
In some possible embodiments, for each child node, the command channel status of the child node is determined by:
controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
if a first reply message sent by the command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
and if the first reply message sent by the command channel port is not received within the first preset time, determining that the command channel state of the child node is an abnormal state.
In some possible embodiments, for each child node, the asynchronous file transfer channel status of the child node is determined by:
periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
if a second reply message sent by the target asynchronous file transmission channel port is received within a second preset time length, determining that the target asynchronous file transmission channel state of the child node is a normal state;
and if the second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time length, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
In some possible embodiments, the target asynchronous file transfer channel port is determined by:
controlling the child node to establish connection with a target node; wherein the target node is a server-side node in communication with the cluster to which the child node belongs;
receiving a target port identifier sent by the target node;
and taking the asynchronous file transmission channel port indicated by the target port identification as the target asynchronous file transmission channel port.
In some possible embodiments, the generating module is executed on the command channel status and the asynchronous file transfer channel status of each child node, and after generating the node status table, the generating module is further configured to:
traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes;
if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the main node is abnormal, generating a main node abnormal notification, and sending the main node abnormal notification to the terminal.
Having described the monitoring method and apparatus of the exemplary embodiments of the present application, an electronic device according to another exemplary embodiment of the present application is next described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the monitoring method according to various exemplary embodiments of the present application described above in the present specification.
The electronic device 130 according to this embodiment of the present application is described below with reference to fig. 8. The electronic device 130 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, the electronic device 130 is represented in the form of a general electronic device. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that couples various system components including the memory 132 and the processor 131.
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM) 1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include programs/utilities 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a monitoring method provided by the present application may also be implemented in the form of a program product, which includes program code for causing a computer device to perform the steps of a monitoring method according to various exemplary embodiments of the present application described above in this specification, when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for monitoring of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (13)

1. A monitoring method is applied to a master node in a cluster, and comprises the following steps:
periodically acquiring a cluster self-checking information table from a database;
determining a command channel state of each child node in the cluster and an asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission;
generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
and sending the node state table to a terminal so that the terminal processes abnormal nodes based on the node state table.
2. The method of claim 1, wherein for each child node, the command channel status of the child node is determined by:
controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
if a first reply message sent by the command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
and if the first reply message sent by the command channel port is not received within the first preset time length, determining that the command channel state of the child node is an abnormal state.
3. The method of claim 1, wherein for each child node, the status of the child node's asynchronous file transfer channel is determined by:
periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
if a second reply message sent by the target asynchronous file transmission channel port is received within a second preset time length, determining that the target asynchronous file transmission channel state of the child node is a normal state;
and if the second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time length, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
4. The method of claim 3, wherein the target asynchronous file transfer channel port is determined by:
controlling the child node to establish connection with a target node; wherein the target node is a server-side node in communication with the cluster to which the child node belongs;
receiving a target port identifier sent by the target node;
and taking the asynchronous file transmission channel port indicated by the target port identification as the target asynchronous file transmission channel port.
5. The method according to claim 1, wherein after generating the node state table based on the command channel state and the asynchronous file transfer channel state of each child node, the method further comprises:
traversing the command channel states of all the child nodes in the node state table and the asynchronous file transmission channel states of all the child nodes;
if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the main node is abnormal, generating a main node abnormal notification, and sending the main node abnormal notification to the terminal.
6. A monitoring apparatus, applied to a master node in a cluster, the apparatus comprising:
the acquisition module is used for periodically acquiring the cluster self-checking information table from the database;
the state determining module is used for determining the command channel state of each child node in the cluster and the asynchronous file transmission channel state of each child node based on the cluster self-checking information table; the command channel state is used for determining whether the corresponding child node normally receives and processes the command, and the asynchronous file transmission channel state is used for determining whether the corresponding child node normally performs asynchronous file transmission;
the generating module is used for generating a node state table based on the command channel state and the asynchronous file transmission channel state of each child node;
and the sending module is used for sending the node state table to a terminal so that the terminal can process abnormal nodes based on the node state table.
7. The apparatus of claim 6, wherein for each child node, the command channel status of the child node is determined by:
controlling the child node to periodically send a first self-checking message to a command channel port of the child node;
if a first reply message sent by the command channel port is received within a first preset time length, determining that the command channel state of the child node is a normal state;
and if the first reply message sent by the command channel port is not received within the first preset time length, determining that the command channel state of the child node is an abnormal state.
8. The apparatus of claim 6, wherein for each child node, the asynchronous file transfer channel status of the child node is determined by:
periodically sending a second self-checking message to a target asynchronous file transmission channel port of the child node;
if a second reply message sent by the target asynchronous file transmission channel port is received within a second preset time length, determining that the target asynchronous file transmission channel state of the child node is a normal state;
and if the second reply message sent by the target asynchronous file transmission channel port is not received within the second preset time length, determining that the target asynchronous file transmission channel state of the child node is an abnormal state.
9. The apparatus of claim 8, wherein the target asynchronous file transfer channel port is determined by:
controlling the child node to establish connection with a target node; wherein the target node is a server-side node in communication with the cluster to which the child node belongs;
receiving a target port identifier sent by the target node;
and taking the asynchronous file transmission channel port indicated by the target port identification as the target asynchronous file transmission channel port.
10. The apparatus of claim 6, wherein the generating module, after executing the command channel status and the asynchronous file transfer channel status of each child node, is further configured to:
traversing the command channel states of all child nodes in the node state table and the asynchronous file transmission channel states of all child nodes;
if the command channel states of all the child nodes in the node state table are abnormal states and the asynchronous file transmission channel states of all the child nodes are abnormal states, determining that the main node is abnormal, generating a main node abnormal notification, and sending the main node abnormal notification to the terminal.
11. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps comprised in the method of any one of claims 1 to 5 in accordance with the obtained program instructions.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-5.
13. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding claims 1-5.
CN202211193476.2A 2022-09-28 2022-09-28 Monitoring method, device, equipment and medium Pending CN115604077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211193476.2A CN115604077A (en) 2022-09-28 2022-09-28 Monitoring method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211193476.2A CN115604077A (en) 2022-09-28 2022-09-28 Monitoring method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115604077A true CN115604077A (en) 2023-01-13

Family

ID=84844182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211193476.2A Pending CN115604077A (en) 2022-09-28 2022-09-28 Monitoring method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115604077A (en)

Similar Documents

Publication Publication Date Title
CN112235130A (en) Method and device for realizing operation and maintenance automation based on SDN network
CN110532322B (en) Operation and maintenance interaction method, system, computer readable storage medium and equipment
JPS61500751A (en) Method for stopping program processes in multiprocessing systems
CN112769652B (en) Node service monitoring method, device, equipment and medium
CN112217847A (en) Micro service platform, implementation method thereof, electronic device and storage medium
CN109542781B (en) Block chain consensus algorithm testing method and device, calculating device and storage medium
CN110855739B (en) Container technology-based remote and heterogeneous resource unified management method and system
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN105892957B (en) A kind of distributed transaction execution method based on Dynamic Program Slicing
CN116483543A (en) Task processing method, device, equipment and storage medium
CN115604077A (en) Monitoring method, device, equipment and medium
CN114816866A (en) Fault processing method and device, electronic equipment and storage medium
CN105335145A (en) Operation result processing method, device and system
CN114679295A (en) Firewall security configuration method and device
CN113114612A (en) Method and device for determining call chain of distributed system
JP3020402B2 (en) Status information collection system and status management system
CN116244099B (en) Method and device for communication of processes in embedded system, electronic equipment and storage medium
CN113449938B (en) System and method for vehicle monitoring
CN115495329A (en) Monitoring method, device, equipment and medium
CN112564927B (en) Self-adaptive resource multi-domain dynamic organization method
CN115378792B (en) Alarm processing method, device and storage medium
CN115150031B (en) Distributed system message response method and device based on distributed message
CN116719617A (en) Distributed task scheduling method and device based on database, electronic equipment and computer medium
CN114490128A (en) Data storage method and device under remote multi-active architecture
CN118175067A (en) Network connection availability detection method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination