A monitoring data display method, device, electronic device and readable storage medium
By receiving component identification and obtaining registry and relationship attribute tables, determining the node to which the component belongs and displaying monitoring data, the problem that users cannot view the node's operating status based on the component is solved, and real-time monitoring of the node's status is achieved.
Patent Information
- Application Number
- CN202210024904.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-01-11
AI Technical Summary
Methods are not provided in the prior art to enable users to view the operating status of corresponding nodes based on components.
By receiving component identification, obtaining the corresponding registry and relational attribute tables, determining the node to which the component belongs, and displaying the monitoring data of the node.
This allows users to view the operating status of corresponding nodes based on components, and realize real-time monitoring and management of node status.
Smart Images

Figure CN114416496B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud technology, and in particular, to a method, device, electronic device and readable storage medium for monitoring data display. Background Art
[0002] With the rapid development of cloud technology, cloud services can be provided based on a cluster (for example, a cluster based on MongoDB). Specifically, different components (for example, Mongos component, Shard component) can be deployed in the nodes included in the cluster. The Mongos component represents a route for data query and data writing; the Shard component is used to store data. The Mongos component can distribute data read / write requests to the Shard component, and the Shard component responds to the data read / write requests to complete data read / write.
[0003] However, in the related art, no corresponding method is provided to enable a user to view the running status of a corresponding node based on a component. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and readable storage medium for monitoring data display, so that a user can view the running status of a corresponding node based on a component. The specific technical solutions are as follows:
[0005] In the first aspect implemented in the present application, first, a method for monitoring data display is provided, and the method includes:
[0006] Receiving a component identifier of a first component as a first component identifier;
[0007] Obtaining, from a plurality of pre-generated registry tables, a registry table recording the first component identifier as a first registry table;
[0008] Obtaining, from a plurality of pre-generated relationship attribute tables, a relationship attribute table recording the registry identifier of the first registry table as a first relationship attribute table;
[0009] Obtaining monitoring data of a first node to which the first component belongs according to a node identifier corresponding to the registry identifier of the first registry table in the first relationship attribute table, and displaying the monitoring data on a monitoring data display page.
[0010] Optionally, the method further includes:
[0011] Receiving a registration request for a second node;
[0012] Generate a registration table for the second node as a second registration table according to the registration request; wherein, the node identifier, network address, node name, and computer room name of the computer room to which the second node belongs are recorded in the second registration table.
[0013] Optionally, after receiving the registration request of the second node, the method further includes:
[0014] Generate a registration table for the second component deployed in the second node as a third registration table; wherein, the component identifier, type identifier, and computer room name of the computer room to which the second component belongs are recorded in the third registration table.
[0015] Optionally, after generating the registration table for the second component deployed in the second node as a third registration table, the method further includes:
[0016] Generate a second relationship attribute table; wherein, the second relationship attribute table includes: the correspondence between the registration table identifier of the third registration table and the node identifier of the second node.
[0017] Optionally, after generating the second relationship attribute table, the method further includes:
[0018] Receive a deletion request for the second node;
[0019] Delete the second registration table, the third registration table, and the second relationship attribute table.
[0020] Optionally, before receiving the component identifier of the first component as the first component identifier, the method further includes:
[0021] Read a pre-configured relationship display table; wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster.
[0022] Display the type identifiers recorded in the relationship display table;
[0023] When receiving a type identifier selection instruction, determine, from the multiple registration tables, the registration table that records the type identifier indicated by the type identifier selection instruction as a fourth registration table;
[0024] Display the component identifiers recorded in the fourth registration table;
[0025] The receiving the component identifier as the first component identifier includes:
[0026] When receiving a component identifier selection instruction, determine, from the displayed component identifiers, the component identifier indicated by the component identifier selection instruction as the first component identifier.
[0027] In the second aspect of the implementation of the present application, a monitoring data display device is provided. The device includes:
[0028] A first component identifier acquisition module, configured to receive the component identifier of a first component as the first component identifier.
[0029] A first registry acquisition module, configured to acquire, from a plurality of pre-generated registries, the registry that records the first component identifier as the first registry.
[0030] A first relationship attribute table acquisition module, configured to acquire, from a plurality of pre-generated relationship attribute tables, the relationship attribute table that records the registry identifier of the first registry as the first relationship attribute table.
[0031] A first display module, configured to acquire the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table, and display it on the monitoring data display page.
[0032] Optionally, the device further includes:
[0033] A registration request acquisition module, configured to receive a registration request for a second node.
[0034] A second registry generation module, configured to generate a registry of the second node as the second registry according to the registration request, where the second registry records the node identifier, network address, node name, and the name of the computer room to which the second node belongs.
[0035] Optionally, the device further includes:
[0036] A second registry generation module, configured to generate a registry of a second component deployed in the second node as the third registry after receiving the registration request for the second node, where the third registry records the component identifier, type identifier, and the name of the computer room to which the second component belongs.
[0037] Optionally, the device further includes:
[0038] A second relationship attribute table generation module, configured to generate a second relationship attribute table after generating the registry of the second component deployed in the second node as the third registry, where the second relationship attribute table includes the correspondence between the registry identifier of the third registry and the node identifier of the second node.
[0039] Optionally, the device further includes:
[0040] A deletion request acquisition module, configured to receive a deletion request for the second node after the second relationship attribute table is generated;
[0041] A deletion module, configured to delete the second registry, the third registry, and the second relationship attribute table.
[0042] Optionally, the apparatus further includes:
[0043] A relationship display table acquisition module, configured to read a pre-configured relationship display table before receiving the component identifier of the first component as the first component identifier; wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster;
[0044] A second display module, configured to display the type identifiers recorded in the relationship display table;
[0045] A fourth registry determination module, configured to, when receiving a type identifier selection instruction, determine, from the multiple registries, the registry that records the type identifier indicated by the type identifier selection instruction as the fourth registry;
[0046] A third display module, configured to display the component identifiers recorded in the fourth registry;
[0047] The first component identifier acquisition module is specifically configured to, when receiving a component identifier selection instruction, determine, from the displayed component identifiers, the component identifier indicated by the component identifier selection instruction as the first component identifier.
[0048] An embodiment of the present application further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0049] The memory is used to store a computer program;
[0050] The processor is configured to implement the monitoring data display method described in any one of the above when executing the program stored on the memory.
[0051] An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program implements the monitoring data display method described in any one of the above when executed by a processor.
[0052] An embodiment of the present application further provides a computer program product including instructions, which, when running on a computer, cause the computer to execute the monitoring data display method described in any one of the above.
[0053] Advantageous effects of the embodiments of the present application:
[0054] The monitoring data display method provided by the embodiment of the present application receives the component identifier of the first component as the first component identifier; obtains the registry that records the first component identifier from multiple pre-generated registries as the first registry; obtains the relationship attribute table that records the registry identifier of the first registry from multiple pre-generated relationship attribute tables as the first relationship attribute table; obtains the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table, and displays it on the monitoring data display page.
[0055] Based on the above processing, the relationship attribute table records the corresponding relationship between the registry identifier and the node, and through the registry, the corresponding component can be determined. Furthermore, by combining the registry and the relationship attribute table, it is possible to determine the node corresponding to the first component represented by the first component identifier, that is, the node where the first component is deployed, and display the monitoring data of this node, enabling the user to view the running status of the corresponding node based on the component.
[0056] Of course, it is not necessary for any product or method implementing the present application to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0058] Figure 1 It is a flowchart of a monitoring data display method provided by the embodiment of the present application;
[0059] Figure 2 It is a flowchart of another monitoring data display method provided by the embodiment of the present application;
[0060] Figure 3 It is a schematic diagram of a page for displaying monitoring data provided by the embodiment of the present application;
[0061] Figure 4 It is a schematic diagram of the principle of monitoring data display provided by the embodiment of the present application;
[0062] Figure 5 It is a structural diagram of a monitoring data display device provided by the embodiment of the present application;
[0063] Figure 6 It is a structural diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0064] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.
[0065] An embodiment of the present application provides a method for displaying monitoring data. This method can be applied to an electronic device that can communicate with each node (e.g., a host) in a cluster to obtain the monitoring data of each node and display the monitoring data based on the method provided in the embodiment of the present application.
[0066] See Figure 1 , Figure 1 which is a flowchart of a method for displaying monitoring data provided in an embodiment of the present application. This method may include the following steps:
[0067] S101: Receive the component identifier of the first component as the first component identifier.
[0068] S102: Obtain the registry that records the first component identifier from multiple pre-generated registries as the first registry.
[0069] S103: Obtain the relationship attribute table that records the registry identifier of the first registry from multiple pre-generated relationship attribute tables as the first relationship attribute table.
[0070] S104: Obtain the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table and display it on the monitoring data display page.
[0071] In the method for displaying monitoring data provided in the embodiment of the present application, the corresponding relationship between the registry identifier and the node is recorded through the relationship attribute table, and the corresponding component can be determined through the registry. Furthermore, by combining the registry and the relationship attribute table, it is possible to determine the node corresponding to the first component represented by the first component identifier, that is, the node where the first component is deployed, and display the monitoring data of this node, enabling the user to view the running status of the corresponding node based on the component.
[0072] Regarding step S101, the component identifier is used to represent the uniqueness of the component. Among them, the component in the embodiment of the present application is a component deployed in a node in the cluster. For example, for a cluster based on MongoDB, the components deployed in the node can be Mongos components or Shard components.
[0073] In one implementation, the electronic device can assign a random number to each deployed component as the component identifier of the component. For example, a UUID (Universally Unique Identifier) can be assigned to each component as the component identifier of the component.
[0074] Regarding step S102, the first registry is used to record the registration information of the first component represented by the first component identifier. That is to say, each component can correspond to a registry for recording the registration information of the component, and the registration information includes the component identifier of the component. In addition, the registration information can also include the type identifier of the component and the name of the computer room where the component belongs.
[0075] Among them, the type identifier of the component is used to represent the component type of the component. In one implementation, the component type of the component can be represented by a type value. For example, for a cluster based on MongoDB, the type value 51 can be used to represent the Mongos component, and the type value 53 can be used to represent the Shard component.
[0076] The name of the computer room where the component belongs is the name of the computer room where the node deploying the component is located.
[0077] Regarding step S103, the registry identifier of the first registry is used to represent the uniqueness of the first registry. That is to say, an identifier can be assigned to each registry as the registry identifier. For example, an ID can be assigned to each registry based on the auto-incrementing ID as the registry identifier of the registry. Correspondingly, the registry identifier of the registry can also be recorded in each registry.
[0078] The first relationship attribute table is used to record the correspondence between the registry identifier of the first registry and the node to which the first component belongs. That is to say, in this application, the correspondence between the registry of the component and the node can be recorded through the relationship attribute table. Therefore, through the relationship attribute table, the correspondence between the component and the node can also be represented, that is, the correspondence between the node and the component deployed in the node.
[0079] For step S104, after going online, the node can periodically send monitoring data to the electronic device. The monitoring data can include at least one of the following: the usage rate of the memory, QPS (Queries Per Second), the current number of connections, the consumed network traffic, and the maximum number of cursors. Therefore, after determining the first relationship attribute table and determining the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table, the node represented by the node identifier (i.e., the first node) can be determined, and this first node is the node where the first component is deployed. Furthermore, the electronic device can filter the monitoring data of the first node from the monitoring data of each node and display it on the monitoring data display page.
[0080] In one embodiment, referring to Figure 2 , on the basis of Figure 1 , before the above step S101, the method may further include the following steps:
[0081] S105: Read the pre-configured relationship display table.
[0082] Wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster.
[0083] S106: Display the type identifiers recorded in the relationship display table.
[0084] S107: When receiving a type identifier selection instruction, determine, from multiple registries, the registry that records the type identifier indicated by the type identifier selection instruction as the fourth registry.
[0085] S108: Display the component identifiers recorded in the fourth registry.
[0086] Correspondingly, the above step S101 may include:
[0087] S1011: When receiving a component identifier selection instruction, determine the component identifier indicated by the component identifier selection instruction from the displayed component identifiers as the first component identifier.
[0088] In the embodiments of the present application, the relationship display table can be locally configured on the electronic device, which records the type identifiers of the components currently deployed in the cluster.
[0089] For example, the fields included in the relationship display table can be referred to Table (1).
[0090] Table (1)
[0091] Field Type Key Abstract description ID Bigint Auto-incrementing ID Top_type Int Top-level type Child_type Int Subtype Child_name Varchar(128) Component name Mark Varchar(128) Remarks
[0092] As can be seen from Table (1), the relationship display table may include an ID field for representing the identifier of a relationship display table; a Top_type (top-level type) field for representing the top-level type recorded in the relationship display table; a Child_type (subtype) field for representing the subtype recorded in the relationship display table; a Child_name (component name) field for representing the component name recorded in the relationship display table (i.e., the component name corresponding to the subtype); and a Mark (remark) field for recording remark information. The "Type" column is used to identify the type of the values of each field. The "key" column represents the specific values of each field. Bigint represents the system data type of Transact-SQL, Int represents the integer type, and Varchar(128) represents the variable-length string type that allows the maximum length of the saved string to be 128 characters.
[0093] Refer to Table (2). Table (2) is a relationship display table provided by an embodiment of the present application.
[0094] Table (2)
[0095]
[0096]
[0097] As can be seen from Table (2), the type value of the Mongos component is represented by "51", the type value of the Shard component is represented by "53", and 50 represents the type value of the node. That is, the node is the top level of each component and can also be called the parent of each component. Correspondingly, each component can be called a subclass of the node. It can be understood that if there are other components deployed in the cluster, their type values can also be represented by other values other than 51 and 53.
[0098] Based on the relationship display table, the type value (i.e., Child_type) of each subclass and the corresponding type identifier (i.e., Child_name) can be determined. For example, based on Table (2), it can be obtained that the type identifiers recorded in the relationship display table include Mongos and Shard.
[0099] In one implementation, refer to Figure 3 , the electronic device can display a drop-down menu including the type identifiers of Mongos and Shard on the monitoring data display page. Correspondingly, the user can select Mongos or Shard in the drop-down menu to view the monitoring data of the corresponding node based on the Mongos component or the Shard component.
[0100] Furthermore, the electronic device can receive a type identifier selection instruction, and determine, from each registry recorded locally, the registry (i.e., the fourth registry) that records the type identifier indicated by the type identifier selection instruction. The determined fourth registry can be one or multiple. For example, when the user selects Mongos, the electronic device can determine the registry of the Mongos component deployed in the nodes of the cluster as the fourth registry; when the user selects Shard, the electronic device can determine the registry of the Shard component deployed in the nodes of the cluster as the fourth registry.
[0101] Then, the electronic device can display the component identifiers recorded in the determined fourth registry. If the determined fourth registry is one, the displayed component identifier is one; if the determined fourth registry is multiple, the displayed component identifiers are multiple. For example, when the user selects Mongos, the electronic device can display the component identifiers of the Mongos component deployed in the nodes of the cluster; when the user selects Shard, the electronic device can display the component identifiers of the Shard component deployed in the nodes of the cluster for the user to select.
[0102] See Figure 3 , Figure 3 In, when the user selects Mongos, on the right side of "Monitoring Type", the electronic device can display the component identifiers of the Mongos component deployed in the nodes of the cluster for the user to select.
[0103] After the user selects the corresponding component identifier, the electronic device can, based on the method provided in the embodiments of the present application, obtain the monitoring data of the corresponding node and display it on the monitoring data display page. For example, see Figure 3 , Figure 3 In, the electronic device can display the CPU usage rate of the node to which the Mongos component selected by the user belongs. Additionally, based on Figure 3 the other controls in, it is also possible to select to display the memory usage rate, memory usage amount, connection count, network traffic, QPS, Cursors, or the percentage of the current connection count, etc., of the node. When displaying the monitoring data, the time period corresponding to the monitoring data to be displayed can be set. For example, display the monitoring data within the previous 0.5 hours, within the previous 1 day, within the previous 3 days, within the previous 1 week, or the user can also customize the time period.
[0104] In one embodiment, the method may further include the following steps:
[0105] Step 1: Receive a registration request for the second node.
[0106] Step 2: Generate a registry for the second node according to the registration request as the second registry.
[0107] Among them, the node identifier, network address, node name, and computer room name of the computer room to which the second node belongs are recorded in the second registration form.
[0108] In an embodiment of the present application, after a new node (i.e., the second node) goes online, the node can send a registration request to the electronic device through an API (Application Programming Interface), and then, the electronic device can generate a registration form for the second node to record the registration information of the second node.
[0109] The electronic device can assign a random number to each node as the node identifier of the node. For example, a UUID can be assigned to each node as the node identifier of the node.
[0110] That is to say, in the present application, corresponding registration forms can be generated for nodes and components. For example, the fields included in the registration form can be seen in Table (3).
[0111] Table (3)
[0112]
[0113]
[0114] As can be seen from Table (3), the registration form can include an ID field for representing the registration form identifier of a registration form; a UUID field for representing the UUID of a node / component; a GuestIP field for representing the IP address of a node; a ProductType for representing the type value of a node / component; a Name field for representing the name of a node / component; and an IDC field for representing the computer room name of the computer room to which the node belongs / the computer room name of the computer room to which the component belongs (i.e., the computer room name of the computer room where the node is deployed). The "Type" column is used to identify the type of the values of each field. The "key" column represents the specific values of each field.
[0115] In one embodiment, after receiving a registration request for the second node, the method may further include the following steps:
[0116] Step 3: Generate a registration form for the second component deployed in the second node as the third registration form.
[0117] Among them, the component identifier, type identifier, and computer room name of the computer room to which the second component belongs are recorded in the third registration form.
[0118] In an embodiment of the present application, when a new node goes online, the electronic device can obtain the registration information of the components deployed in the node and generate a registry corresponding to the components.
[0119] In one embodiment, after generating the third registry, the method may further include the following steps:
[0120] Step Four: Generate a second relationship attribute table.
[0121] Wherein, the second relationship attribute table includes: the correspondence between the registry identifier of the third registry and the node identifier of the second node.
[0122] In an embodiment of the present application, when a new node goes online, the electronic device can also generate a corresponding relationship attribute table to record the correspondence between the node and the registry of the components deployed therein.
[0123] For example, the fields included in the relationship attribute table can be seen in Table (4).
[0124] Table (4)
[0125]
[0126]
[0127] As can be seen from Table (4), the relationship attribute table may include an ID field for representing the identifier of a relationship attribute table; an Instance_ID field for representing the registry identifier of the registry, that is, corresponding to the registry of a component / the registry of a node; a Field field for recording the UUID of the parent level of the component (i.e., the UUID of the node where the component is deployed) when the Instance_ID field represents the registry of a component; when the Instance_ID field represents a node, this field is empty; Value for representing the specific value of the Field field. The "Type" column is used to identify the type of the values of each field. The "key" column represents the specific values of each field.
[0128] In one embodiment, after the above Step Four, the following steps may further be included:
[0129] Step Five: Receive a deletion request for the second node.
[0130] Step Six: Delete the second registry, the third registry, and the second relationship attribute table.
[0131] In an embodiment of the present application, when a node goes offline, relevant tables can be deleted, that is, the registry of the node, the registries of the components deployed therein, and the relationship attribute table containing the correspondence between the node and the registries of the components.
[0132] In one embodiment, the electronic device may also store the recorded tables in a database to back up the tables. Further, when the cluster recovers from a failure, the tables can be retrieved from the database to continue displaying the monitoring data based on the tables.
[0133] See Figure 4 , Figure 4 which is a schematic diagram of the principle of monitoring data display provided by an embodiment of the present application.
[0134] The monitoring service can obtain updates to the Mongo service product line. For example, it can determine that new nodes are added to the MongoDB cluster or existing nodes are removed. Further, based on the above updates, the registered tables of the nodes, the registered tables of the components, and the relationship attribute tables are updated. The monitoring service can obtain the monitoring data of the nodes corresponding to the components indicated by the user based on the recorded tables and display them. In addition, the monitoring service can also store the recorded tables in a database to persist the data to the database and complete the backup of the tables.
[0135] Based on the same inventive concept, an embodiment of the present application also provides a monitoring data display device. See Figure 5 , Figure 5 which is a structural diagram of a monitoring data display device provided by an embodiment of the present application. The device includes:
[0136] A first component identifier acquisition module 501, configured to receive the component identifier of a first component as the first component identifier;
[0137] A first registered table acquisition module 502, configured to retrieve, from a plurality of pre-generated registered tables, the registered table in which the first component identifier is recorded as the first registered table;
[0138] A first relationship attribute table acquisition module 503, configured to retrieve, from a plurality of pre-generated relationship attribute tables, the relationship attribute table in which the registered table identifier of the first registered table is recorded as the first relationship attribute table;
[0139] A first display module 504, configured to obtain the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registered table identifier of the first registered table in the first relationship attribute table, and display it on the monitoring data display page.
[0140] Optionally, the device further includes:
[0141] A registration request acquisition module, configured to receive a registration request for a second node;
[0142] A second registry generation module, configured to generate a registry of the second node as a second registry according to the registration request; wherein, the second registry records the node identifier, network address, node name of the second node, and the name of the computer room to which the second node belongs.
[0143] Optionally, the apparatus further includes:
[0144] A second registry generation module, configured to generate a registry of a second component deployed in the second node as a third registry after receiving the registration request of the second node; wherein, the third registry records the component identifier, type identifier of the second component, and the name of the computer room to which the second component belongs.
[0145] Optionally, the apparatus further includes:
[0146] A second relationship attribute table generation module, configured to generate a second relationship attribute table after generating the registry of the second component deployed in the second node as a third registry; wherein, the second relationship attribute table includes: the correspondence between the registry identifier of the third registry and the node identifier of the second node.
[0147] Optionally, the apparatus further includes:
[0148] A deletion request acquisition module, configured to receive a deletion request for the second node after generating the second relationship attribute table;
[0149] A deletion module, configured to delete the second registry, the third registry, and the second relationship attribute table.
[0150] Optionally, the apparatus further includes:
[0151] A relationship display table acquisition module, configured to read a pre-configured relationship display table before receiving the component identifier of the first component as the first component identifier; wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster.
[0152] A second display module, configured to display the type identifiers recorded in the relationship display table;
[0153] A fourth registry determination module, configured to determine, when receiving a type identifier selection instruction, a registry that records the type identifier indicated by the type identifier selection instruction from the multiple registries as a fourth registry;
[0154] A third display module, configured to display the component identifiers recorded in the fourth registry;
[0155] The first component identifier acquisition module 501 is specifically configured to, when receiving a component identifier selection instruction, determine, from the displayed component identifiers, the component identifier indicated by the component identifier selection instruction as the first component identifier.
[0156] The monitoring data display device provided by the embodiment of the present application records the correspondence between the registry identifier and the node through the relationship attribute table, and the corresponding component can be determined through the registry. Furthermore, by combining the registry and the relationship attribute table, the node corresponding to the first component represented by the first component identifier can be determined, that is, the node where the first component is deployed, and the monitoring data of this node is displayed, enabling the user to view the running status of the corresponding node based on the component.
[0157] The embodiment of the present application also provides an electronic device, as Figure 6 shown, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604. Among them, the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604.
[0158] The memory 603 is used to store a computer program.
[0159] When the processor 601 executes the program stored in the memory 603, the following steps are implemented:
[0160] Receive the component identifier of the first component as the first component identifier.
[0161] Obtain, from multiple pre-generated registries, the registry that records the first component identifier as the first registry.
[0162] Obtain, from multiple pre-generated relationship attribute tables, the relationship attribute table that records the registry identifier of the first registry as the first relationship attribute table.
[0163] Obtain the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table, and display it on the monitoring data display page.
[0164] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0165] The communication interface is used for communication between the above-mentioned electronic device and other devices.
[0166] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0167] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0168] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned monitoring data display methods are implemented.
[0169] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute any of the monitoring data display methods in the above embodiments.
[0170] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0171] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0172] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the embodiments of the device, system, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0173] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A method for monitoring data display, characterized in that, The method includes: Receiving a component identifier of a first component as a first component identifier; Obtaining, from a plurality of pre-generated registry tables, the registry table that records the first component identifier as a first registry table; Obtaining, from a plurality of pre-generated relationship attribute tables, the relationship attribute table that records the registry identifier of the first registry table as a first relationship attribute table; the relationship attribute table records the correspondence between the registry identifier and the node; Obtaining monitoring data of a first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry table in the first relationship attribute table, and displaying the monitoring data on a monitoring data display page.
2. The method according to claim 1, wherein The method further includes: Receiving a registration request for a second node; Generating a registry table of the second node as a second registry table according to the registration request; wherein, the second registry table records the node identifier, network address, node name, and the name of the computer room to which the second node belongs.
3. The method according to claim 2, wherein After receiving the registration request for the second node, the method further includes: Generating a registry table of a second component deployed in the second node as a third registry table; wherein, the third registry table records the component identifier, type identifier, and the name of the computer room to which the second component belongs.
4. The method according to claim 3, characterized in that After generating the registry table of the second component deployed in the second node as a third registry table, the method further includes: Generating a second relationship attribute table; wherein, the second relationship attribute table includes the correspondence between the registry identifier of the third registry table and the node identifier of the second node.
5. The method according to claim 4, wherein After generating the second relationship attribute table, the method further includes: Receiving a deletion request for the second node; Deleting the second registry table, the third registry table, and the second relationship attribute table.
6. The method according to claim 1, wherein Before receiving the component identifier of the first component as a first component identifier, the method further includes: Reading a pre-configured relationship display table; wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster; Displaying the type identifiers recorded in the relationship display table; When receiving a type identifier selection instruction, determining, from the plurality of registry tables, the registry table that records the type identifier indicated by the type identifier selection instruction as a fourth registry table; Displaying the component identifiers recorded in the fourth registry table; The receiving the component identifier as a first component identifier includes: When receiving a component identifier selection instruction, determining the component identifier indicated by the component identifier selection instruction from the displayed component identifiers as the first component identifier.
7. A monitoring data display device, characterized in that, The apparatus includes: A first component identifier obtaining module, configured to receive a component identifier of a first component as a first component identifier; A first registry table obtaining module, configured to obtain, from a plurality of pre-generated registry tables, the registry table that records the first component identifier as a first registry table; A first relationship attribute table obtaining module, configured to obtain, from a plurality of pre-generated relationship attribute tables, the relationship attribute table that records the registry identifier of the first registry table as a first relationship attribute table; the relationship attribute table records the correspondence between the registry identifier and the node; The first display module is configured to obtain the monitoring data of the first node to which the first component belongs according to the node identifier corresponding to the registry identifier of the first registry in the first relationship attribute table, and display it on the monitoring data display page.
8. The device according to claim 7, wherein The device further includes: A registration request acquisition module, configured to receive a registration request for a second node; A second registry generation module, configured to generate a registry of the second node as a second registry according to the registration request; wherein, the node identifier, network address, node name, and computer room name of the computer room to which the second node belongs are recorded in the second registry.
9. The device according to claim 8, characterized in that, The device further includes: A second registry generation module, configured to generate a registry of the second component deployed in the second node as a third registry after receiving the registration request for the second node; wherein, the component identifier, type identifier, and computer room name of the computer room to which the second component belongs are recorded in the third registry.
10. The device according to claim 9, characterized in that, The device further includes: A second relationship attribute table generation module, configured to generate a second relationship attribute table after generating the registry of the second component deployed in the second node as a third registry; wherein, the second relationship attribute table includes: the correspondence between the registry identifier of the third registry and the node identifier of the second node.
11. The device according to claim 10, wherein The device further includes: A deletion request acquisition module, configured to receive a deletion request for the second node after generating the second relationship attribute table; A deletion module, configured to delete the second registry, the third registry, and the second relationship attribute table.
12. The device according to claim 7, wherein The device further includes: A relationship display table acquisition module, configured to read a pre-configured relationship display table before receiving the component identifier of the first component as the first component identifier; wherein, the relationship display table is used to record the type identifiers of the components currently deployed in the cluster. A second display module, configured to display the type identifiers recorded in the relationship display table; A fourth registry determination module, configured to, when receiving a type identifier selection instruction, determine, from the multiple registries, the registry that records the type identifier indicated by the type identifier selection instruction as the fourth registry; A third display module, configured to display the component identifiers recorded in the fourth registry; The first component identifier acquisition module is specifically configured to, when receiving a component identifier selection instruction, determine the component identifier indicated by the component identifier selection instruction from the displayed component identifiers as the first component identifier.
13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; The memory is used to store a computer program; When the processor is configured to execute the program stored on the memory, it implements the method steps described in any one of claims 1-6.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the method steps described in any one of claims 1-6.
Citation Information
Patent Citations
Task processing method and device based on node cluster, equipment and storage medium
CN111930482A
Dynamic Information Hierarchies
US20110029489A1