Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a medium for monitoring components, which are used for solving the problem that each component in a server in the related technology can realize monitoring of the server faults only by manually configuring a corresponding sensor for the component in advance by operation and maintenance personnel.
According to an aspect of an embodiment of the present application, a method for monitoring a component is provided, which is applied to a server and includes:
acquiring XML parameters of a part to be monitored in the server, wherein the XML parameters are used for representing sensor parameters meeting the conditions of monitoring the part to be monitored;
Matching the XML parameters with a preset sensor object set, and determining a target sensor capable of meeting monitoring conditions, wherein parameters corresponding to each sensor deployed by the server are recorded in the sensor object set;
And sending a starting instruction for monitoring the component to be monitored to the target sensor.
Optionally, in another embodiment of the above method according to the present application, the matching the XML parameter with a preset sensor object set, determining a target sensor capable of meeting a monitoring condition includes:
Analyzing the XML parameters and determining sensor object identifiers which are carried by the XML parameters and can meet the monitoring conditions;
detecting whether the sensor object identification is included in the sensor object set;
And if so, taking the sensor corresponding to the sensor object identifier as the target sensor.
Optionally, in another embodiment of the above method according to the present application, the matching the XML parameter with a preset sensor object set, determining a target sensor capable of meeting a monitoring condition includes:
analyzing the XML parameters, and determining sensor configuration parameters carried by the XML parameters and required by the monitoring conditions;
Detecting whether the sensor object set comprises the sensor configuration parameters or not;
And if so, taking the sensor corresponding to the sensor configuration parameter as the target sensor.
Optionally, in another embodiment of the above method according to the present application, after the determining the target sensor capable of meeting the monitoring condition, the method further includes:
if the number of the target sensors is determined to be a plurality of;
And sending a starting instruction for monitoring the component to be monitored to any one of the plurality of target sensors, or sending a starting instruction for monitoring the component to be monitored to a target sensor in which the load running state value is lower than a preset threshold value.
Optionally, in another embodiment of the above method according to the present application, before the obtaining XML parameters of the component to be monitored located in the server, the method further includes:
Monitoring communication interfaces connected with all components to be monitored in the server;
and if the event that the communication interface is connected with the component to be monitored exists, acquiring XML parameters of the component to be monitored.
Optionally, in another embodiment of the above method according to the present application, the sending, to the target sensor, an activation instruction for monitoring the component to be monitored includes:
analyzing the XML parameters, and obtaining monitoring parameters carried by the XML parameters, wherein the monitoring parameters are used for informing the target sensor of monitoring the monitoring frequency and the monitoring category of the part to be monitored;
and sending a starting instruction containing the monitoring parameter to the target sensor.
Optionally, in another embodiment of the above method according to the present application, after said matching the XML parameters with a preset set of sensor objects, the method further includes:
And if the sensor parameters matched with the XML parameters do not exist in the sensor object set, determining that the component to be monitored is not monitored.
According to one aspect of the embodiment of the present application, the method is applied to a server, and includes:
An acquisition module configured to acquire XML parameters of a component to be monitored located in the server, wherein the XML parameters are used for representing sensor parameters meeting the conditions for monitoring the component to be monitored;
The determining module is configured to match the XML parameters with a preset sensor object set, determine target sensors capable of meeting monitoring conditions, and record parameters corresponding to each sensor deployed by the server in the sensor object set;
and the sending module is configured to send a starting instruction for monitoring the component to be monitored to the target sensor.
According to still another aspect of an embodiment of the present application, there is provided an electronic apparatus including:
a memory for storing executable instructions, and
And the display is used for executing the executable instructions with the memory so as to complete the operation of the method of any monitoring component.
According to a further aspect of an embodiment of the present application, there is provided a computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method of any of the above-described monitoring components.
The method and the device can acquire XML parameters of the to-be-monitored component in the server, match the XML parameters with a preset sensor object set, determine target sensors capable of meeting monitoring conditions, record parameters corresponding to each sensor deployed by the server in the sensor object set, and send starting instructions for monitoring the to-be-monitored component to the target sensors. By applying the technical scheme of the application, XML parameters corresponding to each part in the server can be matched with a preset sensor set, so that whether the current server has a sensor meeting the condition of monitoring the part or not can be determined in a targeted manner. If so, it is determined to activate the sensor to monitor the component. Therefore, the problem that the service processing efficiency is affected because the monitoring function can be started only by configuring the corresponding monitoring component for each sensor manually by operation and maintenance personnel in the related technology is avoided.
The technical scheme of the application is further described in detail through the drawings and the embodiments.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered as not existing, and not falling within the scope of protection claimed by the present application.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear are used in the embodiments of the present application) are merely for explaining the relative positional relationship, movement conditions, and the like between the components in a certain specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicators are changed accordingly.
A method for monitoring a component according to an exemplary embodiment of the present application is described below in connection with fig. 1-2. It should be noted that the following application scenarios are only shown for facilitating understanding of the spirit and principles of the present application, and embodiments of the present application are not limited in this respect. Rather, embodiments of the application may be applied to any scenario where applicable.
Furthermore, the application also provides a method, a device, a target terminal and a medium for monitoring the component.
Fig. 1 schematically shows a flow diagram of a method of monitoring a component according to an embodiment of the application. As shown in fig. 1, the method is applied to a server, and includes:
S101, acquiring XML parameters of the to-be-monitored component in the server, wherein the XML parameters are used for representing sensor parameters meeting the conditions of monitoring the to-be-monitored component.
With the continuous development of communication technology, a service platform generally performs corresponding processing on a service through a large-scale computer room with a plurality of servers deployed.
The server typically includes various components, including, for example, a processor, a motherboard, a memory board, a hard disk, a display, and the like.
It can be understood that the sensor is a detection device, can sense the measured information, and can convert the sensed information (such as temperature, blood pressure, humidity, speed and the like) into an electric signal or other information output in a required form according to a certain rule so as to meet the requirements of information transmission, processing, storage, display, recording, control and the like.
The sensor is not particularly limited, and includes, for example, a resistive sensor, a variable frequency sensor, a piezoresistive sensor, a weighing sensor, a physical sensor, a chemical sensor type, and the like.
The sensor is a resistive sensor, which is a device that converts physical quantities, such as displacement, deformation, force, acceleration, humidity, temperature, etc., to be measured into a resistance value. Mainly comprises resistance strain type, piezoresistance type, thermal resistance, thermosensitive, gas-sensitive, humidity-sensitive and other resistance type sensing devices. For the variable frequency sensor, the variable frequency power sensor performs alternating current sampling on input voltage and current signals, and then the sampling value is connected with a digital quantity input secondary instrument through a transmission system such as a cable, an optical fiber and the like, and the digital quantity input secondary instrument performs operation on the sampling value of the voltage and the current.
In one embodiment, the component is a motherboard of a server, which is a circuit board storing electronic circuits. All other components within the server are connected to the motherboard. There are several primary server components on the motherboard, processors (CPUs), chipsets, hard disk drive controllers, expansion slots, memory and ports to support the use of external devices such as keyboards. In addition, the motherboard may contain a network interface, disk controller, and graphics adapter.
Therefore, in order to ensure the running stability of the main board, the application needs to monitor the main board in real time by using the sensor. So as to achieve the purpose of timely informing operation and maintenance personnel to know the operation state of the operation and maintenance personnel.
However, in the prior art, for each component, an operator needs to manually configure a corresponding sensor for the component in advance to monitor, thereby affecting the operation and maintenance efficiency of the operator. Therefore, in order to solve the above-mentioned problem, in the embodiment of the present application, when detecting that a certain component to be monitored exists in the server, XML parameters of the component to be monitored located in the server may be first acquired.
XML is an extensible markup language, among others. Which is a software and hardware independent information transfer tool. In the present application, the data can be transmitted and stored by XML parameters, the focus of which is the content of the data. Hypertext markup language is designed to display data with the focus being on the appearance of the data.
In the embodiment of the application, each component corresponds to a unique XML parameter, for example, the XML parameter can be used for describing hardware information of the component and corresponding sensor parameters supporting monitoring. So that the component can be uniquely determined from the XML parameters later.
In another way, the XML parameters may also include corresponding sensor monitoring parameters. Thereby informing the sensor in which way to monitor the component. The monitoring mode may include monitoring duration, monitoring period, monitoring category and the like.
It should be noted that, the XML parameters of each component in the present application may be manually configured for the XML parameters. It will be appreciated that the type of component and its supported sensor parameters may be subsequently determined by the XML parameters.
S102, matching XML parameters with a preset sensor object set, and determining target sensors capable of meeting monitoring conditions, wherein parameters corresponding to each sensor deployed by a server are recorded in the sensor object set.
In one mode, the sensor object set in the embodiment of the application can include object identifiers corresponding to each sensor deployed by the server. It will be appreciated that the object identification may be the name of the sensor. For example, a temperature sensor identifier, a humidity sensor identifier, a current sensor identifier, a voltage sensor identifier, an in-place sensor identifier, etc. may be used.
In another manner, the sensor object set in the embodiment of the present application may further include sensor configuration parameters corresponding to each sensor deployed by the server. It will be appreciated that the sensor configuration parameter may be a configuration coefficient that characterizes the correspondence of each sensor. For example, the type of parameter it monitors (including, for example, monitoring temperature, monitoring humidity, monitoring current, monitoring voltage, etc.), the power it can monitor, the frequency, etc.
It should be noted that the parameters included in the sensor object set may be manually configured by an operation and maintenance person or automatically generated. As long as it includes parameters corresponding to all sensors deployed by the current server. The application is not limited in this regard.
It will be appreciated that when the set of sensor objects includes object identifiers corresponding to respective sensors, a first sensor object identifier supporting monitoring of the component to be monitored may be determined first according to XML parameters. And matching the first sensor object identifier with the object identifiers corresponding to the sensors included in the sensor object set, so as to determine whether the sensor object set contains the first sensor object identifier. If so, the server is considered to have a sensor supporting monitoring of the component to be monitored, so that the first sensor object can be determined to be the target sensor capable of meeting the monitoring condition.
In the embodiment of the application, the component to be monitored is taken as the CPU for illustration, and the XML parameter corresponding to the component to be monitored can be determined first, then the component is determined to be the CPU by analyzing the XML parameter, and the sensor mark supporting the monitoring of the CPU component is the temperature sensor, and then whether the temperature sensor mark exists in the object marks corresponding to the sensors in the sensor object set is detected. If so, it can be determined that there is a target sensor (i.e., a temperature sensor) in the server that can meet the conditions of the monitor CPU. If not found, it is determined that there is no target sensor in the current server that can meet the conditions of the monitoring CPU, i.e., it is determined that the CPU component is not monitored.
Alternatively, when the sensor object set includes sensor configuration parameters corresponding to each sensor, the first sensor configuration parameters supporting monitoring of the component to be monitored may be determined first according to the XML parameters. And matching the first sensor configuration parameters with the configuration parameters corresponding to the sensors included in the sensor object set, so as to determine whether the sensor object set contains the first sensor configuration parameters. If so, the sensor supporting the monitoring of the component to be monitored exists in the server, so that the sensor corresponding to the first sensor configuration parameter can be determined to be a target sensor capable of meeting the monitoring condition.
Similarly, the component to be monitored is taken as a CPU for illustration, in the embodiment of the application, the XML parameter corresponding to the component to be monitored can be determined first, then the component is determined to be the CPU by analyzing the XML parameter, and the configuration parameter of the first sensor supporting the monitoring of the CPU component is that the monitoring power reaches 1kw, and the monitoring type is the configuration parameter of the monitoring current type. Further, among the sensor configuration parameters corresponding to the respective sensors included in the sensor object set, whether the first sensor configuration parameter exists (i.e., the monitored power reaches 1kw, and the monitored type is the configuration parameter of the monitored current type) is determined. If so, it can be determined that a target sensor capable of meeting the condition of the monitoring CPU exists in the server (namely, a sensor with the configuration parameter of 1kw of monitoring power and the monitoring type of monitoring current type). If not found, it is determined that there is no target sensor in the current server that can meet the conditions of the monitoring CPU, i.e., it is determined that the CPU component is not monitored.
S103, sending a starting instruction for monitoring the part to be monitored to the target sensor.
In one mode, when the target sensor capable of meeting the condition of monitoring the component to be monitored exists in the current server, the method can send a starting instruction for monitoring the component to be monitored to the target sensor. And further the purpose that the starting sensor monitors the part to be monitored is achieved.
The method and the device can acquire XML parameters of the to-be-monitored component in the server, match the XML parameters with a preset sensor object set, determine target sensors capable of meeting monitoring conditions, record parameters corresponding to each sensor deployed by the server in the sensor object set, and send starting instructions for monitoring the to-be-monitored component to the target sensors. By applying the technical scheme of the application, XML parameters corresponding to each part in the server can be matched with a preset sensor set, so that whether the current server has a sensor meeting the condition of monitoring the part or not can be determined in a targeted manner. If so, it is determined to activate the sensor to monitor the component. Therefore, the problem that the service processing efficiency is affected because the monitoring function can be started only by configuring the corresponding monitoring component for each sensor manually by operation and maintenance personnel in the related technology is avoided.
Alternatively, in one possible embodiment of the present application, in S102 (matching the XML parameters with the preset set of sensor objects, determining the target sensor that can meet the monitoring condition), the following steps may be implemented:
analyzing the XML parameters, and determining sensor object identifiers which are carried by the XML parameters and can meet monitoring conditions;
Detecting whether a sensor object identifier is included in a sensor object set;
And if the sensor object identification is included, taking the sensor corresponding to the sensor object identification as a target sensor.
Further, the sensor object set in the embodiment of the present application may include object identifiers corresponding to each sensor deployed by the server. In this way, the sensor object set includes the names of the sensors deployed by the server. For example, the server includes a temperature sensor, a humidity sensor, a current sensor, a voltage sensor, an in-place sensor, and the like.
In one manner, when the sensor object set includes object identifiers corresponding to the respective sensors, a first sensor object identifier supporting monitoring of the component to be monitored may be determined first according to XML parameters. And matching the first sensor object identifier with the object identifiers corresponding to the sensors included in the sensor object set, so as to determine whether the sensor object set contains the first sensor object identifier. If so, the server is considered to have a sensor supporting monitoring of the component to be monitored, so that the first sensor object can be determined to be the target sensor capable of meeting the monitoring condition.
In the embodiment of the application, the component to be monitored is taken as the CPU for illustration, and the XML parameter corresponding to the component to be monitored can be determined first, then the component is determined to be the CPU by analyzing the XML parameter, and the sensor mark supporting the monitoring of the CPU component is the temperature sensor, and then whether the temperature sensor mark exists in the object marks corresponding to the sensors in the sensor object set is detected. If so, it can be determined that there is a target sensor (i.e., a temperature sensor) in the server that can meet the conditions of the monitor CPU. If not found, it is determined that there is no target sensor in the current server that can meet the conditions of the monitoring CPU, i.e., it is determined that the CPU component is not monitored.
Alternatively, in one possible embodiment of the present application, in S102 (matching the XML parameters with the preset set of sensor objects, determining the target sensor that can meet the monitoring condition), the following steps may be implemented:
Analyzing the XML parameters, and determining sensor configuration parameters carried by the XML parameters and capable of meeting monitoring conditions;
Detecting whether a sensor object set comprises sensor configuration parameters or not;
And if the sensor configuration parameters are included, taking the sensor corresponding to the sensor configuration parameters as a target sensor.
Further, the sensor object set in the embodiment of the present application may further include sensor configuration parameters corresponding to each sensor deployed by the server. It will be appreciated that the sensor configuration parameter may be a configuration coefficient that characterizes the correspondence of each sensor. For example, the type of parameter it monitors (including, for example, monitoring temperature, monitoring humidity, monitoring current, monitoring voltage, etc.), the power it can monitor, the frequency, etc.
In the embodiment of the application, the XML parameter corresponding to the component to be monitored can be determined first, then the component is determined to be the main board by analyzing the XML parameter, and the sensor mark supporting the monitoring of the main board component is a temperature sensor, and then whether the temperature sensor mark exists in the object marks corresponding to the sensors in the sensor object set is detected. 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 the monitor motherboard. If the target sensor is not found, it is determined that the target sensor capable of meeting the condition of the monitoring main board does not exist in the current server, and that the main board component is not monitored is determined.
Alternatively, in one possible embodiment of the present application, after S102 (matching the XML parameters with the preset set of sensor objects, determining the target sensor that can meet the monitoring condition), the following steps may be implemented:
if the number of the target sensors is determined to be a plurality of;
And sending a start command for monitoring the component to be monitored to any one of the plurality of target sensors, or sending a start command for monitoring the component to be monitored to a target sensor in which the load running state value is lower than a preset threshold value.
Further, for example, when there are a plurality of target sensors in the server, which can be used for monitoring the component to be monitored, any one of the sensors may be responsible for monitoring the component to be monitored, or the current performance index of each sensor is detected respectively, so that the corresponding load running state is judged according to the performance index, and then the sensor with the lower load is selected to be responsible for monitoring the component to be monitored.
For example, when it is determined that the target sensor capable of satisfying the monitoring condition is a temperature sensor and it is detected that 3 temperature sensors are disposed 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 monitored part number and the running time length of each temperature sensor can be respectively acquired to determine the corresponding load running state. The temperature sensor with the lowest load is selected to be responsible for monitoring the component to be monitored.
Alternatively, in one possible embodiment of the present application, before S101 (acquiring XML parameters of a component to be monitored located in the server), the following steps may be implemented:
Monitoring communication interfaces connected with all components to be monitored in the server;
And if the event that the communication interface is connected with the component to be monitored exists, acquiring XML parameters of the monitoring component.
In one mode, in the process that the server acquires the XML parameters of the monitoring component, whether the condition of the connecting component exists or not can be determined by monitoring each communication interface in real time. For example, when the user pulls out the fault component from the server, the storage module can determine that an event that a communication interface is connected with the component to be monitored exists currently according to feedback of the communication port A communicated with the fault component when the communication port A is subsequently determined to be connected with a new component, and then the XML parameters of the monitoring component can be obtained.
Alternatively, in one possible embodiment of the present application, in S103 (sending an activation instruction for monitoring the component to be monitored to the target sensor), the following steps may be implemented:
analyzing XML parameters, and acquiring monitoring parameters carried by the XML parameters, wherein the monitoring parameters are used for informing a target sensor of monitoring frequency and monitoring category of a part to be monitored;
and sending a starting instruction containing the monitoring parameters to the target sensor.
In one mode, the XML parameters may also include their corresponding sensor monitoring parameters. Thereby informing the sensor in which way to monitor the component. The monitoring mode may include monitoring duration, monitoring period, monitoring category and the like.
Furthermore, when the target sensor capable of meeting the condition of the monitored component exists in the current server, the starting instruction for monitoring the monitored component and the corresponding monitoring parameter can be sent to the target sensor. The purpose of starting the sensor and informing the sensor to monitor the part to be monitored according to the corresponding monitoring parameters is further achieved.
Alternatively, in one possible embodiment of the present application, after S101 (acquiring XML parameters of the component to be monitored located in the server), the following steps may be implemented:
And if the sensor parameters matched with the XML parameters do not exist in the sensor object set, determining that the component to be monitored is not monitored.
Fig. 2 is a schematic flow chart of an overall monitoring component according to an embodiment of the present application, where the flow chart includes:
For the server, the server can monitor the communication interfaces connected with each component to be monitored in the server, and acquire XML parameters of the monitoring component if determining that an event exists in which the communication interfaces are connected with the component to be monitored, and further, two cases are included:
first case:
analyzing the XML parameters, determining sensor object identifiers which are carried by the XML parameters and can meet monitoring conditions, detecting whether the sensor object identifiers are included in a sensor object set, and taking a sensor corresponding to the sensor object identifiers as a target sensor if the sensor object identifiers are included.
Second case:
Analyzing the XML parameters, determining sensor configuration parameters carried by the XML parameters and capable of meeting monitoring conditions, detecting whether the sensor object set comprises the sensor configuration parameters, and taking a sensor corresponding to the sensor configuration parameters as a target sensor if the sensor object set comprises the sensor configuration parameters.
In a further aspect, the server may further parse the XML parameter to obtain a monitoring parameter carried by the XML parameter, where the monitoring parameter is used to inform the target sensor of monitoring the monitoring frequency and the monitoring class of the component to be monitored, and then send a start instruction containing the monitoring parameter to the target sensor. The purpose of starting the sensor and informing the sensor to monitor the part to be monitored according to the corresponding monitoring parameters is further achieved.
In one mode, XML parameters corresponding to each component in the server can be matched with a preset sensor set, so that whether the current server has a sensor meeting the condition of monitoring the component is determined in a targeted manner. If so, it is determined to activate the sensor to monitor the component. Therefore, the problem that the service processing efficiency is affected because the monitoring function can be started only by configuring the corresponding monitoring component for each sensor manually by operation and maintenance personnel in the related technology is avoided.
In another embodiment of the present application, as shown in fig. 3, the present application also provides an apparatus for monitoring a component. The device is applied to a server and comprises:
an obtaining module 201, configured to obtain XML parameters of a component to be monitored located in the server, where the XML parameters are used to characterize sensor parameters that satisfy conditions for monitoring the component to be monitored;
a determining module 202, configured to match the XML parameters with a preset sensor object set, and determine a target sensor capable of meeting a monitoring condition, where parameters corresponding to each sensor deployed by the server are recorded in the sensor object set;
and the sending module 203 is configured to send a starting instruction for monitoring the component to be monitored to the target sensor.
The method and the device can acquire XML parameters of the to-be-monitored component in the server, match the XML parameters with a preset sensor object set, determine target sensors capable of meeting monitoring conditions, record parameters corresponding to each sensor deployed by the server in the sensor object set, and send starting instructions for monitoring the to-be-monitored component to the target sensors. By applying the technical scheme of the application, XML parameters corresponding to each part in the server can be matched with a preset sensor set, so that whether the current server has a sensor meeting the condition of monitoring the part or not can be determined in a targeted manner. If so, it is determined to activate the sensor to monitor the component. Therefore, the problem that the service processing efficiency is affected because the monitoring function can be started only by configuring the corresponding monitoring component for each sensor manually by operation and maintenance personnel in the related technology is avoided.
In another embodiment of the present application, the obtaining module 201 further includes:
An obtaining module 201, configured to parse the XML parameter, and determine a sensor object identifier carried by the XML parameter and capable of meeting the monitoring condition;
an acquisition module 201 configured to detect whether the sensor object identifier is included in the sensor object set;
The obtaining module 201 is configured to take, if included, a sensor corresponding to the sensor object identifier as the target sensor.
In another embodiment of the present application, the obtaining module 201 further includes:
An obtaining module 201, configured to parse the XML parameter, and determine a sensor configuration parameter carried by the XML parameter and capable of meeting the monitoring condition;
An acquisition module 201 configured to detect whether the sensor configuration parameters are included in the sensor object set;
The obtaining module 201 is configured to take, if included, a sensor corresponding to the sensor configuration parameter as the target sensor.
In another embodiment of the present application, the obtaining module 201 further includes:
An acquisition module 201 configured to determine that the number of the target sensors is plural;
an acquisition module 201 configured to send a start-up instruction for monitoring the component to be monitored to any one of the plurality of target sensors, or send a start-up instruction for monitoring the component to be monitored to a target sensor in which a load operation state value is lower than a preset threshold value.
In another embodiment of the present application, the obtaining module 201 further includes:
An acquisition module 201 configured to monitor a communication interface connected to each component to be monitored in the server;
the obtaining module 201 is configured to obtain XML parameters of the component to be monitored if it is determined that there is an event that the communication interface is connected to the component to be monitored.
In another embodiment of the present application, the obtaining module 201 further includes:
the acquiring module 201 is configured to parse the XML parameter, and acquire a monitoring parameter carried by the XML parameter, where the monitoring parameter is used to inform the target sensor of monitoring frequency and monitoring category of the component to be monitored;
An acquisition module 201 is configured to send a start instruction containing the monitoring parameter to the target sensor.
In another embodiment of the present application, the obtaining module 201 further includes:
The obtaining module 201 is configured to determine not to monitor the component to be monitored if it is detected that no sensor parameter matched with the XML parameter exists in the sensor object set.
Fig. 4 is a block diagram of a logic structure of an electronic device, according to an example embodiment. For example, electronic device 300 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as a memory comprising instructions executable by an electronic device processor to perform the method of network monitoring described above, the method comprising obtaining XML parameters of a component to be monitored located in the server, wherein the XML parameters are used to characterize sensor parameters that fulfill the conditions for monitoring the component to be monitored, matching the XML parameters with a preset set of sensor objects, determining a target sensor that can fulfill the conditions for monitoring, the set of sensor objects having parameters corresponding to each sensor deployed by the server recorded therein, and sending a start instruction to the target sensor for monitoring the component to be monitored. Optionally, the above instructions may also be executed by a processor of the electronic device to perform the other steps involved in the above-described exemplary embodiments. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by a processor of an electronic device to perform the above-mentioned method of network monitoring, the method comprising obtaining XML parameters of a component to be monitored located in the server, wherein the XML parameters are used to characterize sensor parameters that fulfill the conditions for monitoring the component to be monitored, matching the XML parameters with a preset set of sensor objects, determining a target sensor capable of fulfilling the monitoring conditions, wherein parameters corresponding to each sensor deployed by the server are recorded in the set of sensor objects, and sending a start instruction for monitoring the component to be monitored to the target sensor. Optionally, the above instructions may also be executed by a processor of the electronic device to perform the other steps involved in the above-described exemplary embodiments.
Fig. 4 is an exemplary diagram of a computer device 300. It will be appreciated by those skilled in the art that the schematic diagram 4 is merely an example of the computer device 300 and is not limiting of the computer device 300, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the computer device 300 may also include input and output devices, network access devices, buses, etc.
The Processor 302 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being a control center of the computer device 300, with various interfaces and lines connecting the various parts of the overall computer device 300.
The memory 301 may be used to store computer readable instructions and the processor 302 implements the various functions of the computer device 300 by executing or executing the computer readable instructions or modules stored in the memory 301 and invoking data stored in the memory 301. The memory 301 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), etc., and a storage data area that may store data created according to the use of the computer device 300, etc. In addition, the Memory 301 may include a hard disk, memory, a plug-in hard disk, a smart Memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash Memory card (FLASH CARD), at least one magnetic disk storage device, a flash Memory device, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or other non-volatile/volatile storage device.
The modules integrated with computer device 300 may be stored in a computer readable storage medium if implemented as software functional modules and sold or used as a stand-alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above-described embodiments, or may be implemented by means of computer readable instructions to instruct related hardware, where the computer readable instructions may be stored in a computer readable storage medium, where the computer readable instructions, when executed by a processor, implement the steps of the method embodiments described above.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.