Method, apparatus, electronic device and medium for monitoring components
By obtaining the XML parameters of components in the server to match the sensor set, and automatically determine and start the monitoring sensor, the problem of low operation and maintenance efficiency caused by manual configuration of sensors by operation and maintenance personnel is solved, and business processing efficiency is improved.
Patent Information
- Application Number
- CN202111445913.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the prior art, each component in the server requires operation and maintenance personnel to manually configure corresponding sensors for monitoring, resulting in low operation and maintenance efficiency.
By obtaining the XML parameters of the components to be monitored in the server, matching the preset set of sensor objects, determining the target sensor that meets the monitoring conditions, and sending a startup command to it to achieve automatic monitoring.
The steps of operation and maintenance personnel manually configuring sensors are avoided, and the server business processing efficiency is improved.
Smart Images

Figure CN114116406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data communication technologies, and in particular, to a method, device, electronic device, and medium for monitoring components. Background Art
[0002] Currently, with the rapid development of cloud technologies, servers have become indispensable hardware facilities in the process of cloud technology development.
[0003] Among them, in related technologies, various sensors are usually used to monitor the operating status of each component in the server in real time, so as to determine whether there is a fault information of a certain component in the server. It can be understood that the monitoring accuracy and effectiveness of the sensors will directly affect the service processing efficiency of the server.
[0004] However, there is a problem with the above method, that is, for each component, operation and maintenance personnel need to manually configure corresponding sensors for it in advance for monitoring, which affects the operation and maintenance efficiency of the operation and maintenance personnel. Summary of the Invention
[0005] Embodiments of the present application provide a method, device, electronic device, and medium for monitoring components. Embodiments of the present application are used to solve the problem in related technologies that for each component in the server, operation and maintenance personnel need to manually configure corresponding sensors for it in advance to monitor server faults.
[0006] Among them, according to one aspect of the embodiments of the present application, a method for monitoring components, applied to a server, includes:
[0007] Obtain XML parameters of a component to be monitored located in the server, where the XML parameters are used to represent sensor parameters that meet the conditions for monitoring the component to be monitored;
[0008] Match the XML parameters with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions, and the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects;
[0009] Send a start instruction for monitoring the component to be monitored to the target sensor.
[0010] Optionally, in another embodiment based on the above method of the present application, the matching the XML parameters with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions includes:
[0011] Parse the XML parameters to determine a sensor object identifier carried by the XML parameters that can meet the monitoring conditions;
[0012] Check whether the set of sensor objects includes the sensor object identifier;
[0013] If it includes, use the sensor corresponding to the sensor object identifier as the target sensor.
[0014] Optionally, in another embodiment based on the above method of this application, the matching of the XML parameter with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions includes:
[0015] Parse the XML parameter to determine the sensor configuration parameters carried by the XML parameter that are required to meet the monitoring conditions;
[0016] Check whether the set of sensor objects includes the sensor configuration parameters;
[0017] If it includes, use the sensor corresponding to the sensor configuration parameter as the target sensor.
[0018] Optionally, in another embodiment based on the above method of this application, after determining the target sensor that can meet the monitoring conditions, it further includes:
[0019] If it is determined that the number of target sensors is multiple;
[0020] Send a start instruction for monitoring the component to be monitored to any one of the multiple target sensors; or, send a start instruction for monitoring the component to be monitored to the target sensor whose load operation state value is lower than a preset threshold.
[0021] Optionally, in another embodiment based on the above method of this application, before obtaining the XML parameter of the component to be monitored located in the server, it further includes:
[0022] Monitor the communication interfaces connected to each component to be monitored in the server;
[0023] When it is determined that there is an event where a communication interface is connected to a component to be monitored, obtain the XML parameter of the component to be monitored.
[0024] Optionally, in another embodiment based on the above method of this application, the sending of the start instruction for monitoring the component to be monitored to the target sensor includes:
[0025] Parse the XML parameter to obtain the monitoring parameters carried by the XML parameter, and the monitoring parameters are used to inform the target sensor of the monitoring frequency and monitoring category for monitoring the component to be monitored;
[0026] Send a start instruction containing the monitoring parameters to the target sensor.
[0027] Optionally, in another embodiment based on the above method of the present application, after matching the XML parameter with a preset set of sensor objects, the following is further included:
[0028] If it is detected that there is no sensor parameter in the set of sensor objects that matches the XML parameter, it is determined not to monitor the component to be monitored.
[0029] Wherein, according to one aspect of the embodiments of the present application, when applied to a server, it includes:
[0030] An acquisition module, configured to acquire the XML parameter of the component to be monitored located in the server, where the XML parameter is used to characterize the sensor parameter that satisfies the condition for monitoring the component to be monitored;
[0031] A determination module, configured to match the XML parameter with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions, and the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects;
[0032] A sending module, configured to send a start instruction for monitoring the component to be monitored to the target sensor.
[0033] According to yet another aspect of the embodiments of the present application, an electronic device is provided, including:
[0034] A memory, configured to store executable instructions; and
[0035] A display, configured to execute the executable instructions with the memory to complete the operation of the method for monitoring the component as described in any one of the above.
[0036] According to still another aspect of the embodiments of the present application, a computer-readable storage medium is provided, configured to store computer-readable instructions, and when the instructions are executed, the operation of the method for monitoring the component as described in any one of the above is performed.
[0037] In this application, XML parameters of components to be monitored located in a server can be obtained; the XML parameters are matched with a preset set of sensor objects, and target sensors that can meet the monitoring conditions are determined. The parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects; a start instruction for monitoring the components to be monitored is sent to the target sensors. By applying the technical solution of this application, the XML parameters corresponding to each component in the server can be matched with the preset set of sensors, so as to specifically determine whether there are sensors in the current server that meet the conditions for monitoring the component. If so, it is further determined to start the sensor to monitor the component. Thus, it avoids the problem of affecting the business processing efficiency caused by the need for operation and maintenance personnel to manually configure corresponding monitoring components for each sensor in the related art to enable the monitoring function.
[0038] The technical solution of this application will be further described in detail below with reference to the drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings forming a part of the specification depict embodiments of the application and, together with the description, are used to explain the principles of the application.
[0040] Referring to the drawings, the application can be more clearly understood according to the following detailed description, where:
[0041] Figure 1 is a schematic diagram of a method for monitoring components proposed by this application;
[0042] Figure 2 is a schematic diagram of the system flow for monitoring components proposed by this application;
[0043] Figure 3 is a schematic diagram of the structure of an electronic device for monitoring components proposed by this application;
[0044] Figure 4 is a schematic diagram of the structure of an electronic device for monitoring components proposed by this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] Various exemplary embodiments of the application will now be described in detail with reference to the drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the application.
[0046] At the same time, it should be understood that, for the sake of convenience of description, the dimensions of the various parts shown in the drawings are not drawn in actual proportional relationships.
[0047] The following description of at least one exemplary embodiment is merely illustrative in nature and is not intended as any limitation to the application or its use.
[0048] Technologies, methods, and devices that are known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods, and devices shall be regarded as part of the specification.
[0049] It should be noted that like reference numerals and letters denote like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof in subsequent figures is not necessary.
[0050] In addition, the technical solutions between various embodiments of the present application may be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, such a combination of technical solutions shall be considered non-existent and not within the scope of protection required by the present application.
[0051] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present application are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0052] Next, in conjunction with Figure 1 - Figure 2 A method for monitoring components according to an exemplary embodiment of the present application will be described. It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principle of the present application, and the embodiments of the present application are not limited in this regard. On the contrary, the embodiments of the present application can be applied to any applicable scenario.
[0053] Furthermore, the present application also proposes a method, device, target terminal, and medium for monitoring components.
[0054] Figure 1 A schematic flowchart of a method for monitoring components according to an embodiment of the present application is schematically shown. As Figure 1 shown, this method is applied to a server and includes:
[0055] S101, obtaining XML parameters of a component to be monitored located in the server, where the XML parameters are used to characterize sensor parameters that meet the conditions for monitoring the component to be monitored.
[0056] With the continuous development of communication technologies, business platforms usually process corresponding services through large computer rooms with multiple servers deployed.
[0057] Among them, a server usually contains various components, such as a processor, a motherboard, a memory board, a hard disk, a display, and so on.
[0058] It can be understood that a sensor is a detection device that can sense the information to be measured and transform the sensed information (such as temperature, blood pressure, humidity, speed, etc.) into an electrical signal or other required form of information output according to certain rules to meet the requirements of information transmission, processing, storage, display, recording, and control, etc.
[0059] Among them, the present application does not specifically limit the sensor. For example, it includes resistive sensors, frequency conversion sensors, piezoresistive sensors, weighing sensors, physical sensors, chemical sensors, etc.
[0060] Among them, taking the sensor as a resistive sensor, a resistive sensor is a device that converts physical quantities such as displacement, deformation, force, acceleration, humidity, temperature, etc. to be measured into resistance values. There are mainly resistive strain type, piezoresistive type, thermal resistance, thermosensitive, gas-sensitive, humidity-sensitive and other resistive sensor devices. For a frequency conversion sensor, a frequency conversion power sensor samples the input voltage and current signals in alternating current, and then connects the sampled values to a digital input secondary instrument through a transmission system such as a cable or optical fiber. The digital input secondary instrument performs operations on the sampled values of the voltage and current.
[0061] In one way, taking the component as the motherboard, the motherboard of the server is a circuit board for storing electronic circuits. All other components in the server are connected to the motherboard. There are several most important server components on the motherboard: a processor (CPU), a chipset, a hard disk drive controller, expansion slots, memory, and ports to support the use of external devices such as keyboards. In addition, the motherboard may include a network interface, a disk controller, and a graphics adapter.
[0062] Thus, it can be seen that in order to ensure the stability of the motherboard operation, the present application needs to use sensors to monitor the motherboard in real time, so as to achieve the purpose of timely informing the operation and maintenance personnel of its operation status.
[0063] However, in the prior art, for each component, the operation and maintenance personnel need to manually configure the corresponding sensor in advance for monitoring, which affects the operation and maintenance efficiency of the operation and maintenance personnel. Therefore, to solve the above problems, in the embodiments of the present application, when it is detected that there is a component to be monitored in the server, the XML parameters of the component to be monitored located in the server can be obtained first.
[0064] Among them, XML is an extensible markup language. It is a tool for information transmission independent of software and hardware. In the present application, XML parameters can be used to transmit and store data, and its focus is the content of the data. Hypertext Markup Language is designed to display data, and its focus is the appearance of the data.
[0065] In the embodiments of the present application, each component corresponds to a unique XML parameter. For example, this XML parameter can be used to describe the hardware information of the component and the sensor parameters corresponding to the supported monitoring. So that the component can be uniquely determined from the XML parameter subsequently.
[0066] In another way, the XML parameter can also include the corresponding sensor monitoring parameters. Thereby informing the sensor of the monitoring method for monitoring the component. The monitoring method can include monitoring duration, monitoring period, monitoring category, etc.
[0067] It should be noted that the XML parameters of each component in the present application can be manually configured in advance for it. It can be understood that the type of the component and the sensor parameters supported by it can be determined through the XML parameter subsequently.
[0068] S102, match the XML parameter with a preset set of sensor objects to determine the target sensors that can meet the monitoring conditions. The set of sensor objects records the parameters corresponding to each sensor deployed on the server.
[0069] In one way, the set of sensor objects in the embodiments of the present application can include the object identifiers corresponding to each sensor deployed on the server. It can be understood that this object identifier can be the name of the sensor. For example, it can be a temperature sensor identifier, a humidity sensor identifier, a current sensor identifier, a voltage sensor identifier, an in-position sensor identifier, etc.
[0070] In another way, the set of sensor objects in the embodiments of the present application can also include the sensor configuration parameters corresponding to each sensor deployed on the server. It can be understood that this sensor configuration parameter can be the configuration coefficient corresponding to each sensor. For example, it can be the parameter category it monitors (such as including monitoring temperature, monitoring humidity, monitoring current, monitoring voltage, etc.), the power it can monitor, the frequency, etc.
[0071] It should be noted that the parameters included in the set of sensor objects can be manually configured by the operation and maintenance personnel or automatically generated. As long as it includes the parameters corresponding to all the sensors deployed on the current server. The present application does not make a limitation on this.
[0072] It can be understood that when the sensor object set includes the object identifiers corresponding to each sensor, the first sensor object identifier that supports monitoring the component to be monitored can be determined first according to the XML parameter. Then, the first sensor object identifier is matched with the object identifiers corresponding to each sensor included in the sensor object set, and then it is determined whether the first sensor object identifier is included in the sensor object set. If so, it is considered that there is a sensor in the server that supports monitoring the component to be monitored. Therefore, it can be determined that the first sensor object is the target sensor that can meet the monitoring conditions.
[0073] Taking the component to be monitored as the CPU as an example, in the embodiment of the present application, the XML parameter corresponding to the component to be monitored can be determined first, and then by parsing the XML parameter, it is determined that the component is the CPU, and the sensor identifier that supports monitoring the CPU component is the temperature sensor. Then, it is detected whether there is a temperature sensor identifier among the object identifiers corresponding to each sensor included in the sensor object set. If so, it can be determined that there is a target sensor (i.e., the temperature sensor) in the server that can meet the monitoring conditions of the CPU. If not found, it is determined that there is no target sensor in the current server that can meet the monitoring conditions of the CPU, that is, it can be determined not to monitor the CPU component.
[0074] In another way, when the sensor object set includes the sensor configuration parameters corresponding to each sensor, the first sensor configuration parameter that supports monitoring the component to be monitored can be determined first according to the XML parameter. Then, the first sensor configuration parameter is matched with the configuration parameters corresponding to each sensor included in the sensor object set, and then it is determined whether the first sensor configuration parameter is included in the sensor object set. If so, it is considered that there is a sensor in the server that supports monitoring the component to be monitored. Therefore, it can be determined that the sensor corresponding to the first sensor configuration parameter is the target sensor that can meet the monitoring conditions.
[0075] Similarly, taking the component to be monitored as the CPU as an example, in the embodiment of the present application, the XML parameters corresponding to the component to be monitored can be determined first, and then it can be determined that the component is the CPU by parsing the XML parameters. Moreover, the first sensor configuration parameters for supporting the monitoring of the CPU component are: the monitoring power reaches 1 kw, and the monitoring type is the configuration parameter of the monitoring current category. Further, among the sensor configuration parameters corresponding to each sensor included in the sensor object set, whether there is the above first sensor configuration parameter (that is, the monitoring power reaches 1 kw, and the monitoring type is the configuration parameter of the monitoring current category). If so, it can be determined that there is a target sensor in the server that can meet the condition of monitoring the CPU (that is, the sensor with the configuration parameter that the monitoring power reaches 1 kw and the monitoring type is the monitoring current category). If not found, it is determined that there is no target sensor in the current server that can meet the condition of monitoring the CPU, that is, it can be determined not to monitor this CPU component.
[0076] S103. Send a start instruction for monitoring the component to be monitored to the target sensor.
[0077] In one way, when the present application determines that there is a target sensor in the current server that can meet the condition of monitoring the component to be monitored, a start instruction for monitoring the component to be monitored can be sent to the target sensor. Thus, the purpose of starting the sensor to monitor the component to be monitored is achieved.
[0078] In the present application, the XML parameters of the component to be monitored located in the server can be obtained; the XML parameters are matched with a preset sensor object set to determine a target sensor that can meet the monitoring condition, and the parameters corresponding to each sensor deployed in the server are recorded in the sensor object set; a start instruction for monitoring the component to be monitored is sent to the target sensor. By applying the technical solution of the present application, the XML parameters corresponding to each component in the server can be matched with the preset sensor set, so as to specifically determine whether there is a sensor in the current server that meets the condition of monitoring the component. If so, it is further determined to start the sensor to monitor the component. Thus, the problem of affecting the service processing efficiency caused by the need for operation and maintenance personnel to manually configure the corresponding monitoring components for each sensor to enable the monitoring function in the related art is avoided.
[0079] Optionally, in a possible implementation manner of the present application, in S102 (matching the XML parameters with a preset sensor object set to determine a target sensor that can meet the monitoring condition), the following steps can be implemented:
[0080] Parse the XML parameters to determine the sensor object identifier carried by the XML parameters that can meet the monitoring condition;
[0081] Check whether the set of sensor object identifiers includes a sensor object identifier;
[0082] If it includes, use the sensor corresponding to the sensor object identifier as the target sensor.
[0083] Furthermore, in the embodiments of the present application, the set of sensor objects may include the object identifiers corresponding to each sensor deployed by the server. In this way, the set of sensor objects contains the names of each sensor deployed by the server. For example, the server includes a temperature sensor, a humidity sensor, a current sensor, a voltage sensor, an in-position sensor, and so on.
[0084] In one way, when the set of sensor object identifiers includes the object identifiers corresponding to each sensor, the first sensor object identifier that supports monitoring the component to be monitored can be determined according to the XML parameters first. Then, match the first sensor object identifier with the object identifiers corresponding to each sensor included in the set of sensor objects, and further determine whether the set of sensor objects contains the first sensor object identifier. If so, it is considered that there is a sensor in the server that supports monitoring the component to be monitored. Therefore, it can be determined that the first sensor object is the target sensor that can meet the monitoring conditions.
[0085] Taking the component to be monitored as the CPU as an example, in the embodiments of the present application, the XML parameters corresponding to the component to be monitored can be determined first. Then, by parsing the XML parameters, it is determined that the component is a CPU, and the sensor identifier that supports monitoring the CPU component is a temperature sensor. Then, it is detected whether there is a temperature sensor identifier among the object identifiers corresponding to each sensor included in the set of sensor objects. If so, it can be determined that there is a target sensor (i.e., a temperature sensor) in the server that can meet the monitoring conditions of the CPU. If not found, it is determined that there is no target sensor in the current server that can meet the monitoring conditions of the CPU, that is, it can be determined not to monitor the CPU component.
[0086] Optionally, in a possible implementation manner of the present application, in S102 (matching the XML parameters with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions), the following steps may be implemented:
[0087] Parse the XML parameters to determine the sensor configuration parameters required to meet the monitoring conditions carried by the XML parameters;
[0088] Detect whether the set of sensor objects includes the sensor configuration parameters;
[0089] If it includes, use the sensor corresponding to the sensor configuration parameters as the target sensor.
[0090] Further, the sensor object set in the embodiments of the present application may further include sensor configuration parameters corresponding to each sensor deployed by the server. It can be understood that the sensor configuration parameters may be configuration coefficients corresponding to each sensor. For example, it may be the parameter categories it monitors (such as monitoring temperature, monitoring humidity, monitoring current, monitoring voltage, etc.), the power it can monitor, the frequency, etc.
[0091] Taking the motherboard as an example of the component to be monitored, in the embodiments of the present application, the XML parameters corresponding to the component to be monitored can be first determined, and then by parsing the XML parameters, it is determined that the component is a motherboard, and the sensor identifier that supports monitoring the motherboard component is a temperature sensor. Then, among the object identifiers corresponding to each sensor included in the sensor object set, it is detected whether there is a temperature sensor identifier. If so, it can be determined that there is a target sensor (i.e., a temperature sensor) in the server that can meet the condition of monitoring the motherboard. If not found, it is determined that there is no target sensor in the current server that can meet the condition of monitoring the motherboard, that is, it can be determined not to monitor the motherboard component.
[0092] Optionally, in a possible implementation manner of the present application, after S102 (matching the XML parameters with a preset sensor object set to determine a target sensor that can meet the monitoring condition), the following steps may be implemented:
[0093] If it is determined that the number of target sensors is multiple;
[0094] Send a start instruction for monitoring the component to be monitored to any one of the multiple target sensors; or, send a start instruction for monitoring the component to be monitored to the target sensor whose load operation state value is lower than a preset threshold.
[0095] Further, for example, when there are multiple target sensors in the server that can be used to monitor the component to be monitored, any one of them can be responsible for monitoring the component to be monitored; or the current performance indicators of each sensor can be detected respectively, so as to judge its corresponding load operation state according to the performance indicators, and then select the sensor with a lower load among them to be responsible for monitoring the component to be monitored.
[0096] For example, when it is determined that the target sensor that can meet the monitoring condition is a temperature sensor, and it is detected that there are 3 temperature sensors deployed in the server, any one of the temperature sensors can be selected to be responsible for monitoring the component to be monitored. Or, the current number of monitored components and the running duration, etc. of each temperature sensor can be collected respectively to determine its corresponding load operation state. Thus, select the temperature sensor with the lowest load to be responsible for monitoring the component to be monitored.
[0097] Optionally, in a possible implementation manner of the present application, before S101 (obtaining the XML parameters of the component to be monitored located in the server), the following steps may be implemented:
[0098] Monitor the communication interfaces connected to each component to be monitored in the server;
[0099] When it is determined that there is an event in which a communication interface is connected to a component to be monitored, obtain the XML parameters of the monitoring component.
[0100] In one way, during the process of the server obtaining the XML parameters of the monitoring component, it is possible to determine whether there is a situation of connected components by monitoring each communication interface in real time. For example, when the user pulls out a faulty component from the server, the storage module can, based on the feedback of communication port A that communicates with the faulty component, determine that when the communication port A is connected to a new component, it is detected that there is an event in which a communication interface is connected to a component to be monitored, and then the XML parameters of the monitoring component can be obtained.
[0101] Optionally, in a possible implementation manner of the present application, in S103 (sending a start instruction for monitoring the component to be monitored to the target sensor), the following steps may be implemented:
[0102] Parse the XML parameters to obtain the monitoring parameters carried by the XML parameters. The monitoring parameters are used to inform the target sensor of the monitoring frequency and monitoring category for monitoring the component to be monitored;
[0103] Send a start instruction including the monitoring parameters to the target sensor.
[0104] In one way, the XML parameters may further include the corresponding sensor monitoring parameters. Thus, it is informed the sensor of the monitoring method for monitoring the component. The monitoring method may include monitoring duration, monitoring period, and monitoring category, etc.
[0105] Furthermore, when the present application determines that there is a target sensor in the current server that can meet the conditions for monitoring the component to be monitored, a start instruction for monitoring the component to be monitored and the corresponding monitoring parameters can be sent to the target sensor. Thus, the purpose of starting the sensor and informing the sensor to monitor the component to be monitored according to the corresponding monitoring parameters is achieved.
[0106] Optionally, in a possible implementation manner of the present application, after S101 (obtaining the XML parameters of the component to be monitored located in the server), the following steps may be implemented:
[0107] If it is detected that there are no sensor parameters in the sensor object set that match the XML parameters, it is determined not to monitor the component to be monitored.
[0108] Take Figure 2 as an example for illustration. The following is a schematic flow diagram of the overall monitoring component proposed in the embodiments of the present application, which includes:
[0109] For the server, it can monitor the communication interfaces connected to each component to be monitored in the server, and when it is determined that there is an event where a communication interface is connected to a component to be monitored, it obtains the XML parameters of the monitoring component. Further, there are two cases:
[0110] The first case:
[0111] Parse the XML parameters to determine the sensor object identifier that can meet the monitoring conditions carried by the XML parameters; detect whether the sensor object set includes the sensor object identifier; if it includes, use the sensor corresponding to the sensor object identifier as the target sensor.
[0112] The second case:
[0113] Parse the XML parameters to determine the sensor configuration parameters required to meet the monitoring conditions carried by the XML parameters; detect whether the sensor object set includes the sensor configuration parameters; if it includes, use the sensor corresponding to the sensor configuration parameters as the target sensor.
[0114] Furthermore, the server can also parse the XML parameters to obtain the monitoring parameters carried by the XML parameters, where the monitoring parameters are used to inform the target sensor of the monitoring frequency and monitoring category for monitoring the component to be monitored; then send a start instruction containing the monitoring parameters to the target sensor. Thus, the purpose of starting the sensor and informing the sensor to monitor the component to be monitored according to the corresponding monitoring parameters is achieved.
[0115] In one way, the XML parameters corresponding to each component in the server can be matched with a preset sensor set, so as to specifically determine whether there is a sensor in the current server that meets the conditions for monitoring the component. If so, then determine to start the sensor to monitor the component. Thus, it avoids the problem of affecting the business processing efficiency caused by the need for operation and maintenance personnel to manually configure the corresponding monitoring components for each sensor to enable the monitoring function in the related art.
[0116] In another embodiment of the present application, as Figure 3 shown, the present application also provides a device for a monitoring component. Among them, the device is applied to the server and includes:
[0117] An acquisition module 201, configured to acquire the XML parameters of the component to be monitored located in the server, where the XML parameters are used to represent the sensor parameters that meet the conditions for monitoring the component to be monitored;
[0118] A determination module 202, configured to match the XML parameter with a preset set of sensor objects, and determine a target sensor that can meet the monitoring condition, where parameters corresponding to each sensor deployed by the server are recorded in the set of sensor objects;
[0119] A sending module 203, configured to send a start instruction for monitoring the component to be monitored to the target sensor.
[0120] In this application, the XML parameter of the component to be monitored located in the server can be obtained; the XML parameter is matched with a preset set of sensor objects to determine a target sensor that can meet the monitoring condition, and parameters corresponding to each sensor deployed by the server are recorded in the set of sensor objects; a start instruction for monitoring the component to be monitored is sent to the target sensor. By applying the technical solution of this application, the XML parameters corresponding to each component in the server can be matched with a preset set of sensors, so as to specifically determine whether there is a sensor in the current server that meets the condition for monitoring the component. If so, it is further determined to start the sensor to monitor the component. Thereby, the problem of affecting the service processing efficiency caused by the need for operation and maintenance personnel to manually configure a corresponding monitoring component for each sensor to enable the monitoring function in the related art is avoided.
[0121] In another embodiment of this application, the obtaining module 201 further includes:
[0122] The obtaining module 201, configured to parse the XML parameter and determine a sensor object identifier carried by the XML parameter that can meet the monitoring condition;
[0123] The obtaining module 201, configured to detect whether the set of sensor objects includes the sensor object identifier;
[0124] The obtaining module 201, configured to, if it includes, use the sensor corresponding to the sensor object identifier as the target sensor.
[0125] In another embodiment of this application, the obtaining module 201 further includes:
[0126] The obtaining module 201, configured to parse the XML parameter and determine sensor configuration parameters required to meet the monitoring condition carried by the XML parameter;
[0127] The obtaining module 201, configured to detect whether the set of sensor objects includes the sensor configuration parameters;
[0128] The obtaining module 201, configured to, if it includes, use the sensor corresponding to the sensor configuration parameters as the target sensor.
[0129] In another embodiment of the present application, the acquisition module 201 further includes:
[0130] The acquisition module 201 is configured to, if it is determined that the number of the target sensors is multiple;
[0131] The acquisition module 201 is configured to send a start instruction for monitoring the component to be monitored to any one of the multiple target sensors; or, send a start instruction for monitoring the component to be monitored to the target sensor whose load operation state value is lower than a preset threshold.
[0132] In another embodiment of the present application, the acquisition module 201 further includes:
[0133] The acquisition module 201 is configured to monitor communication interfaces connected to each component to be monitored in the server;
[0134] The acquisition module 201 is configured to, if it is determined that there is an event that a communication interface is connected to a component to be monitored, acquire XML parameters of the component to be monitored.
[0135] In another embodiment of the present application, the acquisition module 201 further includes:
[0136] The acquisition module 201 is configured to parse the XML parameters to acquire monitoring parameters carried by the XML parameters, where the monitoring parameters are used to inform the target sensor of the monitoring frequency and monitoring category for monitoring the component to be monitored;
[0137] The acquisition module 201 is configured to send a start instruction including the monitoring parameters to the target sensor.
[0138] In another embodiment of the present application, the acquisition module 201 further includes:
[0139] The acquisition module 201 is configured to, if it is detected that there is no sensor parameter in the sensor object set that matches the XML parameters, determine not to monitor the component to be monitored.
[0140] Figure 4 It is a logical structure block diagram of an electronic device shown according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0141] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is further provided, such as a memory including instructions. The above instructions can be executed by a processor of an electronic device to complete the above method for network monitoring. The method includes: obtaining XML parameters of a component to be monitored located in the server, where the XML parameters are used to characterize sensor parameters that meet the conditions for monitoring the component to be monitored; matching the XML parameters with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions, and the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects; sending a start instruction for monitoring the component to be monitored to the target sensor. Optionally, the above instructions can also be executed by a processor of an electronic device to complete other steps involved in the above exemplary embodiment. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0142] In an exemplary embodiment, an application program / computer program product is further provided, including one or more instructions. The one or more instructions can be executed by a processor of an electronic device to complete the above method for network monitoring. The method includes: obtaining XML parameters of a component to be monitored located in the server, where the XML parameters are used to characterize sensor parameters that meet the conditions for monitoring the component to be monitored; matching the XML parameters with a preset set of sensor objects to determine a target sensor that can meet the monitoring conditions, and the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects; sending a start instruction for monitoring the component to be monitored to the target sensor. Optionally, the above instructions can also be executed by a processor of an electronic device to complete other steps involved in the above exemplary embodiment.
[0143] Figure 4 FIG. is an example diagram of a computer device 300. Those skilled in the art can understand that the schematic Figure 4 is only an example of the computer device 300, and does not constitute a limitation on the computer device 300. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the computer device 300 may further include input / output devices, network access devices, buses, etc.
[0144] The so-called processor 302 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor 302 may also be any conventional processor, etc. The processor 302 is the control center of the computer device 300, and connects various parts of the entire computer device 300 through various interfaces and lines.
[0145] The memory 301 can be used to store computer-readable instructions. The processor 302 realizes various functions of the computer device 300 by running or executing the computer-readable instructions or modules stored in the memory 301, and by calling the data stored in the memory 301. The memory 301 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the computer device 300. In addition, the memory 301 may include a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, Read-Only Memory (ROM), Random Access Memory (RAM), or other non-volatile / volatile storage devices.
[0146] If the modules integrated in the computer device 300 are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by computer-readable instructions to instruct relevant hardware. The computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed by the processor, the steps of the above-described various method embodiments can be realized.
[0147] Other embodiments of the present application will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only illustrative, and the true scope and spirit of the present application are pointed out by the following claims.
[0148] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A method for monitoring components, characterized in that, Applied to a server, including: Obtain XML parameters of a component to be monitored in the server, where the XML parameters are used to characterize sensor parameters that meet the conditions for monitoring the component to be monitored; Match the XML parameters with a preset set of sensor objects to determine target sensors that can meet the monitoring conditions, where the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects; wherein, The step of matching the XML parameters with a preset set of sensor objects to determine target sensors that can meet the monitoring conditions includes: Parse the XML parameters to determine the sensor object identifier carried by the XML parameters that can meet the monitoring conditions; detect whether the sensor object identifier is included in the set of sensor objects; if included, use the sensor corresponding to the sensor object identifier as the target sensor; and / or, Parse the XML parameters to determine the sensor configuration parameters required to meet the monitoring conditions carried by the XML parameters; detect whether the sensor configuration parameters are included in the set of sensor objects; if included, use the sensor corresponding to the sensor configuration parameters as the target sensor; Send a start instruction for monitoring the component to be monitored to the target sensor.
2. The method according to claim 1, wherein After determining the target sensors that can meet the monitoring conditions, it further includes: If it is determined that the number of target sensors is multiple; Send a start instruction for monitoring the component to be monitored to any one of the multiple target sensors; or, send a start instruction for monitoring the component to be monitored to the target sensors whose load operation state value is lower than a preset threshold.
3. The method according to claim 1, characterized in that, Before obtaining the XML parameters of the component to be monitored in the server, it further includes: Monitor the communication interfaces connected to each component to be monitored in the server; If it is determined that there is an event where a communication interface is connected to a component to be monitored, obtain the XML parameters of the component to be monitored.
4. The method according to claim 1, wherein The step of sending a start instruction for monitoring the component to be monitored to the target sensor includes: Parse the XML parameters to obtain the monitoring parameters carried by the XML parameters, where the monitoring parameters are used to inform the target sensor of the monitoring frequency and monitoring category for monitoring the component to be monitored; Send a start instruction including the monitoring parameters to the target sensor.
5. The method according to claim 1, wherein After matching the XML parameters with a preset set of sensor objects, it further includes: If it is detected that there are no sensor parameters in the set of sensor objects that match the XML parameters, determine not to monitor the component to be monitored.
6. A device of a monitoring component implemented by the method according to any one of claims 1-5, characterized in that, Applied to a server, including: An acquisition module configured to obtain XML parameters of a component to be monitored in the server, where the XML parameters are used to characterize sensor parameters that meet the conditions for monitoring the component to be monitored; A determination module configured to match the XML parameters with a preset set of sensor objects to determine target sensors that can meet the monitoring conditions, where the parameters corresponding to each sensor deployed in the server are recorded in the set of sensor objects; A sending module, configured to send a startup instruction for monitoring the component to be monitored to the target sensor.
7. An electronic device, characterized in that, Comprising: A memory for storing executable instructions; And, A processor, configured to execute the executable instructions with the memory to complete the operations of the method of any one of claims 1-5 for the monitoring component.
8. An electronic device, characterized in that, Comprising: A memory for storing executable instructions; And, A processor, configured to execute the executable instructions with the memory to complete the operations of the method of any one of claims 1-5 for the monitoring component.
Citation Information
Patent Citations
Data monitoring method and apparatus
CN107066371A
Sensor file adding method, device and equipment for server monitoring project
CN113032333A