CN111953562A - Equipment state monitoring method and device - Google Patents
Equipment state monitoring method and device Download PDFInfo
- Publication number
- CN111953562A CN111953562A CN202010743891.5A CN202010743891A CN111953562A CN 111953562 A CN111953562 A CN 111953562A CN 202010743891 A CN202010743891 A CN 202010743891A CN 111953562 A CN111953562 A CN 111953562A
- Authority
- CN
- China
- Prior art keywords
- micro
- connection
- service
- cache
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/143—Termination or inactivation of sessions, e.g. event-controlled end of session
- H04L67/145—Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Health & Medical Sciences (AREA)
- Cardiology (AREA)
- General Health & Medical Sciences (AREA)
- Computer And Data Communications (AREA)
Abstract
The present specification provides a method and an apparatus for monitoring a device status, which, on one hand, solves the problem of connection resource consumption caused by full connection of control microservices and connection microservices in the prior art; on the other hand, the control microservice does not need to maintain the mapping relation between the connection microservice and the specific loaded network equipment, and only needs to monitor the network equipment information in the cache microservice, so that the state change of the corresponding connection microservice loading equipment can be sensed in time when the connection microservice has faults, restarts and the like.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for monitoring a device status.
Background
The micro-service architecture is characterized in that a software system is decomposed into autonomous modules, the autonomous modules can be independently deployed, communication is carried out in a lightweight mode and a language-independent mode, and a business target is jointly achieved. Typical microservice framework implementations such as: kubernetes.
Under the environment of a data center network, a park network and the like, the controller needs to manage the network equipment, and flow control and intelligent management of the network equipment are achieved. The controller needs to monitor the state of the network device, and when the network device and the controller are disconnected or restored, the controller needs to sense the state in time and notify the corresponding state to the user, or perform a restoration action based on a failure.
Under the micro-service framework, the connection micro-service and the control micro-service of the controller are often divided into different micro-services, and in order to maximally implement flexible processing on the connection established between the network device and the controller, the connection of the network device is distributed among a plurality of different connection micro-service instances for processing and maintenance. The connection micro-service is used for receiving and maintaining communication with the network equipment; the control microservice is used for the management of all connected microservices, whereby there can be an overall view of the network devices establishing the connection with the controller. Fig. 1 is a micro service architecture in the prior art, as shown in fig. 1, under the micro service architecture, a plurality of control micro services and a plurality of connection micro services are operated in a controller. The control microservices establish full connectivity with the connection microservices, i.e. each control microservice establishes connectivity with all the connection microservices.
However, in a full-connection mode, when the number of network devices managed by the controller reaches a certain order of magnitude, the connection microservices expand to many connection microservices after elastic expansion, at this time, the connection between the connection microservices and the control microservices is too many, and for the control microservices, too many connections bring pressure to own operating system resources.
Disclosure of Invention
In order to overcome the problems in the related art, the present specification provides a method and an apparatus for monitoring a device status.
According to a first aspect of embodiments herein, there is provided a device status monitoring method, the method comprising:
the cache micro-service receives a write-in message sent by a connection micro-service, wherein the write-in message comprises equipment information of network equipment which is connected with a controller or is to be connected;
the cache micro-service sets the survival time for the network equipment according to the write-in message and starts a timer associated with the survival time or updates the timer corresponding to the network equipment, wherein the timer is used for starting timing when the cache micro-service receives the write-in message aiming at the network equipment;
when the timer for the network equipment exceeds the survival time, the cache micro-service does not receive a write-in message which is sent by the connection micro-service and aims at the network equipment, and the cache micro-service sets the connection state of the network equipment and the cache micro-service to be invalid or deletes equipment information corresponding to the network equipment;
the cache micro-service receives a read message periodically sent by the control micro-service, wherein the read message is used for reading the connection state between the network equipment and the connection micro-service recorded in the cache micro-service.
Optionally, the cache microserver records the device information of the network device according to the write-in message, and updating the timer corresponding to the network device includes: when the cache micro-service receives a write-in message which is sent by the connection micro-service and aims at the network equipment, the cache micro-service determines whether a timer corresponding to the network equipment exceeds the survival time corresponding to the network equipment, and if the timer does not exceed the survival time, the timer is updated to be in an initial default state.
Optionally, after the cache microservice sets the connection state of the network device and the cache microservice to be invalid, the method further includes: if the cache micro-service receives a write-in message which is sent by the connection micro-service and aims at the network equipment, the cache micro-service updates a timer corresponding to the network equipment to an initial default state so as to enable the timer to be restarted.
Optionally, the method further includes: controlling the microservice to periodically poll the cache microservice to obtain information stored in the cache microservice, wherein the information stored in the cache microservice comprises: device information of the network device, connection state between the network device and the connection microservice, and identification of the connection microservice to which the network device is connected.
Optionally, the method further includes: the control micro-service determines the network equipment with a failed connection state and the connection micro-service correspondingly connected with the network equipment according to the information stored in the acquired cache micro-service;
and the control micro-service determines the fault type according to the connection state and sends an alarm, wherein the fault type comprises the fault of the network equipment or the fault of the connection micro-service.
Optionally, the method further includes:
the connection microservice receives a connection request sent by the network equipment;
the connection micro service sends a write-in message to the cache micro service, wherein the write-in message comprises the equipment information of the network equipment to be connected with the controller;
a connection micro-service receives a keep-alive message periodically sent by the network equipment, wherein the keep-alive message is used for determining whether the network equipment and the connection micro-service keep connected or not;
and the connection micro-service sends a write-in message to the cache micro-service according to the received keep-alive message, wherein the write-in message comprises the equipment information of the network equipment which establishes connection with the controller.
According to a second aspect of embodiments herein, there is provided an apparatus for monitoring a status of a device, the apparatus comprising: the micro-service module, the control micro-service module and the cache micro-service module are connected;
the cache micro-service module is used for receiving a write-in message sent by the connection micro-service module, wherein the write-in message comprises equipment information of network equipment which is connected with the controller or is to be connected;
the cache micro-service module is used for setting survival time for the network equipment according to the write-in message and starting a timer associated with the survival time or updating a timer corresponding to the network equipment, wherein the timer is used for starting timing when the cache micro-service receives the write-in message aiming at the network equipment;
when the timer for the network device exceeds the lifetime, the cache micro-service module does not receive a write-in message for the network device sent by the connection micro-service module, and the cache micro-service module is used for setting the connection state of the network device and the cache micro-service module to be invalid or deleting the device information corresponding to the network device by the cache micro-service module;
the cache micro-service module receives a reading message which is periodically sent by the control micro-service module, wherein the reading message is used for reading the connection state between the network equipment and the connection micro-service module, which is recorded in the cache micro-service module.
Optionally, the cache microservice module is further configured to determine whether a timer corresponding to the network device exceeds a lifetime corresponding to the network device when the cache microservice module receives a write-in message sent by the connection microservice module and addressed to the network device, and if the timer does not exceed the lifetime, the cache microservice module updates the timer to an initial default state.
Optionally, after the cache micro service module sets the connection state of the network device and the cache micro service module to be invalid, if the cache micro service module receives a write message, which is sent by the connection micro service module and is addressed to the network device, the cache micro service module updates the timer corresponding to the network device to an initial default state, so that the timer is restarted.
Optionally, the control microservice module is configured to periodically poll the cache microservice module to obtain information stored in the cache microservice module, where the information stored in the cache microservice module includes: the device information of the network device, the connection state between the network device and the connection micro-service module, and the identification of the connection micro-service module connected with the network device.
Optionally, the control microservice module is further configured to determine, according to the information stored in the obtained cache microservice module, a network device with a failed connection state and a connection microservice module to which the network device is correspondingly connected;
the control micro-service module is also used for determining the fault type according to the connection state and sending an alarm, wherein the fault type comprises the fault of the network equipment or the fault of the connection micro-service module.
Optionally, the connection microservice module is configured to receive a connection request sent by the network device;
the connection micro-service module sends a write-in message to the cache micro-service module, wherein the write-in message comprises the equipment information of the network equipment to be connected with the controller;
a connection micro-service module receives a keep-alive message periodically sent by the network equipment, wherein the keep-alive message is used for determining whether the network equipment is connected with the connection micro-service module or not;
and the connection micro-service module sends a write-in message to the cache micro-service module according to the received keep-alive message, wherein the write-in message comprises the equipment information of the network equipment which is connected with the controller.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects: the method provided by the disclosure solves the problem of connection resource consumption caused by full connection of the control micro-service and the connection micro-service in the prior art; on the other hand, the control microservice does not need to maintain the mapping relation between the connection microservice and the specific network equipment carried by the network equipment, and only needs to monitor the network equipment information in the cache microservice, so that the state change of the corresponding network equipment carried by the connection microservice can be sensed in time when the connection microservice has faults, restarts and the like.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a micro-service architecture of the prior art;
FIG. 2 is a schematic diagram of a microservice architecture provided by the present disclosure;
fig. 3 is a schematic flow chart of a device status monitoring method provided by the present disclosure;
FIG. 4 is a schematic flow chart diagram of another method for monitoring the status of a device provided by the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus state monitoring device provided in the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The device state monitoring method provided by the disclosure can be applied to a controller, the controller can be a controller cluster or a single controller, and the physical architecture of the controller is not limited by the disclosure. The software system of the controller of the present disclosure may employ a micro-service architecture including a connection micro-service, a control micro-service, and a cache micro-service. The micro-services may be embodied in containers. In the present disclosure, the connection microservice and the control microservice may avoid resource consumption caused by full connection of the control microservice and the connection microservice by caching state information between the microservice interaction network device and the connection microservice.
Specifically, fig. 2 is a schematic architecture diagram of a micro service architecture provided by the present disclosure, and fig. 3 is a schematic flow diagram of an apparatus status monitoring method provided by the present disclosure, as shown in fig. 2 and fig. 3, the apparatus status monitoring method provided by the present disclosure includes:
in step 202, the connection microservice receives a connection request sent by a network device.
The embodiment of the present disclosure takes the network device 11 as an example to describe the provided device status monitoring method. When the network device 11 sends a connection request to the controller, the connection request is distributed to any connection microservice for processing by the load balancing module, which is described by taking the example that the connection request is distributed to the connection microservice 21. The connectivity microservice is responsible for receiving and maintaining communications with network devices.
And 204, the connection micro-service sends a write-in message to the cache micro-service, wherein the write-in message comprises the equipment information of the network equipment to be connected with the controller.
After the connection microserver 21 receives the connection request sent by the network device 11, the connection microserver 21 sends a write message to the cache microserver, where the write message includes device information of the network device 11 to which the controller is to establish a connection. Wherein the device information may be an IP address of the network device, a serial number of the network device, and the like. The network device can be a switch, a router and a firewall. The type of network device is not limited in this disclosure.
The write request is for causing the cache to write the device information of the microservice network device 11 into the cache microservice. And in turn, allows control microservice 31 and control microservice 32 to obtain information stored in the cache microservices by periodically polling the cache microservices. The information stored in the cache microservice may include: device information of the network device, connection state between the network device and the connection microservice, and identification of the connection microservice to which the network device is connected. For example, the cache microservice may store device information of the network device 11, an identifier of the connection microservice 21 corresponding to the network device 11, and a connection status between the network device 11 and the connection microservice 21.
The control microservice 31 and the control microservice 32 may further respectively obtain all information stored in the cache microservice, and determine a network device with a failed connection state and a connection microservice to which the network device is correspondingly connected.
The control microserver reads the information of one network device from the cache microserver, which means that a new device is on line, and if the device information is aged and deleted or the connection state between the network device and the connection microserver is set to be invalid, the network device is away, namely, the connection with the controller is disconnected.
After establishing a connection with the connection microservice 21, the network device 11 will periodically send keep-alive messages to the connection microservice 21. If the connection microservice does not receive the keep-alive message sent by the network device in the period exceeding the preset period, it means that the network device 11 is disconnected from the connection microservice 21. In order to enable the control microservice to know the connection state between the network device 11 and the connection microservice 21, in step 208, the connection microservice sends a write message to the cache service according to the received keep-alive message, that is, the connection microservice 21 periodically writes the connection state between the network device 11 and the connection microservice into the cache microservice, so that the control microservice knows the connection state between the network device 11 and the connection microservice 21.
Specifically, after receiving the keep-alive message sent by the network device 11, the connection microserver 21 sends a write message to the cache microserver, where the write message includes device information of the network device 11 that establishes a connection with the controller.
Corresponding to steps 202 and 204 above, the cache microserver receives the write message sent by the connectivity microserver. Specifically, the cache microservice may cause the control microservice to obtain the connection status between each network device and the connection microservice by performing steps 302-308. FIG. 4 is a schematic flow chart of the device status monitoring method executed on the cache microserver side according to the present disclosure
After receiving a write-in request sent by a connection microserver, a cache microserver determines that if the network equipment is written in for the first time according to equipment information carried by the write-in request, the cache microserver records the equipment information of the network equipment and sets Time To Live (TTL) for the network equipment; and if the cache micro-service determines that the network equipment is not written for the first time according to the write request, updating the timer corresponding to the network equipment and restarting timing.
It should be noted that different network devices may set different lifetime. The length of the TTL is determined by the writer at the time of writing.
The cache microserver utilizes a timer to count the time interval of the write requests received for the same network device twice. If the time interval of the write requests for the same network device, which are received twice before and after the cache micro-service, exceeds the lifetime, the network device and the connection micro-service may be considered to be disconnected at this time, and at this time, the connection state may be set to be invalid or the cache micro-service deletes the device information corresponding to the network device.
Of course, another possible implementation manner for step 306 is that the cache microserver for the network device receives the write information for the network device sent by the connection microserver when the timer for the network device does not exceed the lifetime, and at this time, the timer corresponding to the network device may be updated to be in the initial default state. Updating the timer to the initial default state may ensure that the timer is restarted, that is, the connection state between the network device and the connection microservice recorded in the cache microservice is ensured to be normal and valid.
In step 306, another possible implementation manner is that after the cache microserver sets the connection state of the network device and the connection microserver to be invalid, the cache microserver receives a write message for the network device sent by the connection microserver again, and then updates the timer corresponding to the network device to the initial default state so as to restart the timer.
For example, when the network device 11 first sends a connection request to the connection microserver 21, the connection microserver 21 sends a write request to the cache microserver, and the cache microserver receives the write request sent by the connection microserver 21, and according to the device information of the network device 11 carried in the write request, it can be determined that the related information of the network device 11 is first written to the cache microserver, so that the device information of the network device 11 is recorded, and a time to live TTL is set for the network device 11. Assuming that the TTL set for the network device 11 is 5S, if the timer corresponding to the network device 11 counts that the cache microserver still does not receive the write request associated with the network device 11 sent by the connection microserver 21 after exceeding 5S, at this time, it is considered that the network device 11 is disconnected from the connection microserver 21, and at this time, the cache microserver sets the connection state between the network device 11 and the connection microserver to be disabled. If the 3S is passed, the cache micro service receives the write request associated with the network device 11 sent by the connection micro service 21, which means that the connection between the connection micro service 21 and the network device 11 is normal, the connection micro service 21' can normally receive the keep-alive message sent by the network device 11, and the cache 502 micro service resets the timer corresponding to the network device 11 to the initial default state to restart the timing, so that it can be ensured that the time recorded by the timer does not exceed the lifetime corresponding to the network device, that is, it can be ensured that the connection state between the network device 11 and the connection micro service 21 recorded in the cache micro service is normal and valid.
The cache micro-service receives the read information periodically sent by the control micro-service, and the control micro-service can determine whether the connection between the network equipment and the controller is abnormal or not according to the connection state between the network equipment and the connection micro-service recorded by the read cache micro-service.
Of course, in step 306, if the cache microserver deletes the device information corresponding to the network device, the information recorded in the cache microserver read by the control microserver is the information of the network device connected to the controller, that is, the information of the network device disconnected from the connection microserver is not stored in the cache microserver, so that the load of the control microserver can be reduced when the control microserver periodically reads the information in the cache microserver.
In the prior art, there is actually a technical problem that, in a full-connection mode, if a connection microservice itself fails, is restarted, and the like, in the architecture shown in fig. 1, the connection microservice itself cannot execute any notification action, and a network device carried on the connection microservice should be disconnected with disconnection of the connection microservice, but the connection microservice itself fails, and cannot perform disconnection processing operation, and a control microservice needs to implement a set of complex mapping relationship between connection microservice and network device connection, so that a corresponding network device state can be processed after sensing a connection microservice failure. The control micro-service sends the write-in message to the cache micro-service through the connection micro-service, and when the cache micro-service does not receive the write-in message of a certain network device after the survival time is exceeded, the cache micro-service sets the connection state of the network device and the connection micro-service to be invalid or deletes the device information corresponding to the network device, so that the control micro-service can timely sense whether the network device is still connected with the controller.
When the controlling microservice determines that the connection state between the network device and the connecting microservice is abnormal, a preliminary inference is of a failure of the network device. In one implementation, if the control microservice determines that the connection states of all network devices connected to the microservice are failure states, it may preliminarily determine that the connection microservice is abnormal.
And determining a fault type according to the connection state and sending an alarm, wherein the fault type comprises a fault of the network equipment or a fault of the connection micro-service. Thereby providing more accurate alarm suggestions for maintenance personnel.
The method provided by the disclosure solves the problem of connection resource consumption caused by full connection of the control micro-service and the connection micro-service in the prior art; on the other hand, the control microservice does not need to maintain the mapping relation between the connection microservice and the specific loaded network equipment, and only needs to monitor the network equipment information in the cache microservice, so that the state change of the corresponding connection microservice loading equipment can be sensed in time when the connection microservice has faults, restarts and the like.
The present disclosure also provides an apparatus state monitoring device, fig. 5 is a schematic structural diagram of the apparatus state monitoring device provided by the present disclosure, and as shown in fig. 5, the apparatus includes: a cache micro-service module 501, a connection micro-service module 502 and a control micro-service module 503;
the cache micro-service module 501 is configured to receive a write message sent by a connection micro-service module, where the write message includes device information of a network device that establishes a connection with a controller or is to establish a connection;
the cache microservice module 501 is configured to set a lifetime for the network device according to the write-in message and start a timer associated with the lifetime or update a timer corresponding to the network device, where the timer is configured to start timing when the cache microservice receives the write-in message for the network device;
when the timer for the network device exceeds the lifetime, the cache micro-service module 501 does not receive a write-in message for the network device sent by the connection micro-service module 502, and the cache micro-service module 501 is configured to set the connection state between the network device and the cache micro-service module 501 to be invalid or delete the device information corresponding to the network device by the cache micro-service module 501;
the cache micro-service module 501 receives a read message periodically sent by the control micro-service module 503, where the read message is used to read the connection state between the network device and the connection micro-service module recorded in the cache micro-service module 501.
Optionally, the cache micro-service module 501 is further configured to determine whether a timer corresponding to the network device exceeds a lifetime corresponding to the network device when the cache micro-service module 501 receives a write-in message sent by the connection micro-service module 502 and addressed to the network device, and if the timer does not exceed the lifetime, the cache micro-service module 501 updates the timer to an initial default state.
Optionally, after the cache micro service module 501 sets the connection state between the network device and the cache micro service module 501 to be invalid, if the cache micro service module 501 receives a write message for the network device sent by the connection micro service module 502, the cache micro service module 501 updates the timer corresponding to the network device to an initial default state so that the timer is restarted.
The connection microservice module 502 is configured to receive a connection request sent by a network device;
the connection microservice module 502 sends a write-in message to the cache microservice module 501, where the write-in message includes device information of the network device to be connected with the controller;
a connection microservice module 502 receives a keep-alive message periodically sent by the network device, where the keep-alive message is used to determine whether the network device and the connection microservice module 502 keep connected;
the connection micro-service module 502 sends a write-in message to the cache micro-service module 501 according to the received keep-alive message, where the write-in message includes device information of a network device that establishes a connection with the controller.
Optionally, the control micro-service module 503 is configured to periodically poll the cache micro-service module to obtain information stored in the cache micro-service module 501, where the information stored in the cache micro-service module includes: the device information of the network device, the connection state between the network device and the connection micro-service module, and the identification of the connection micro-service module connected with the network device.
The control micro-service module 503 is further configured to determine, according to the information stored in the cache micro-service module 501, a network device with a failed connection state and a connection micro-service module 502 to which the network device is correspondingly connected;
the control microservice module 503 is further configured to determine a fault type according to the connection status and send an alarm, where the fault type includes a fault of the network device or a fault of the connection microservice module.
Therefore, according to the device, when the connection micro-service module goes wrong, restarts and the like, the connection state, the equipment information and the like stored in the cache micro-service module fail after the survival time is reached. The control micro-service module can sense the failure of the equipment information in the cache micro-service through periodic polling to know that the connection state between the network equipment and the connection micro-service is changed and the connection state is failed. After the connection micro-service module is recovered and reestablished, the network device reestablishes connection with the connection micro-service module and interacts the keep-alive messages, the connection micro-service module receives the keep-alive messages and writes the device information into the cache micro-service module again and resets a timer corresponding to the network device, and at the moment, the control micro-service module reads effective device information from the cache micro-service module again to sense the device state recovery and manage the device again.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.
Claims (10)
1. A method for monitoring the condition of a device, the method comprising:
the cache micro-service receives a write-in message sent by a connection micro-service, wherein the write-in message comprises equipment information of network equipment which is connected with a controller or is to be connected;
the cache micro-service sets the survival time for the network equipment according to the write-in message and starts a timer associated with the survival time or updates the timer corresponding to the network equipment, wherein the timer is used for starting timing when the cache micro-service receives the write-in message aiming at the network equipment;
when the timer for the network equipment exceeds the survival time, the cache micro-service does not receive a write-in message which is sent by the connection micro-service and aims at the network equipment, and the cache micro-service sets the connection state of the network equipment and the cache micro-service to be invalid or deletes equipment information corresponding to the network equipment;
the cache micro-service receives a read message periodically sent by the control micro-service, wherein the read message is used for reading the connection state between the network equipment and the connection micro-service recorded in the cache micro-service.
2. The method of claim 1, wherein the cache microserver records the device information of the network device according to the write message, and wherein updating the timer corresponding to the network device comprises:
when the cache micro-service receives a write-in message which is sent by the connection micro-service and aims at the network equipment, the cache micro-service determines whether a timer corresponding to the network equipment exceeds the survival time corresponding to the network equipment, and if the timer does not exceed the survival time, the timer is updated to be in an initial default state.
3. The method of claim 1, wherein after the cache microservice invalidates a connection status of the network device to the connection microservice, the method further comprises:
if the cache micro-service receives a write-in message which is sent by the connection micro-service and aims at the network equipment, the cache micro-service updates a timer corresponding to the network equipment to an initial default state so as to enable the timer to be restarted.
4. The method according to any one of claims 1-3, further comprising:
controlling the microservice to periodically poll the cache microservice to obtain information stored in the cache microservice, wherein the information stored in the cache microservice comprises: device information of the network device, connection state between the network device and the connection microservice, and identification of the connection microservice to which the network device is connected.
5. The method of claim 1, further comprising:
the control micro-service determines the network equipment with a failed connection state and the connection micro-service correspondingly connected with the network equipment according to the information stored in the acquired cache micro-service;
and the control micro-service determines the fault type according to the connection state and sends an alarm, wherein the fault type comprises the fault of the network equipment or the fault of the connection micro-service.
6. A method for monitoring the status of a device, the method comprising:
the connection microservice receives a connection request sent by the network equipment;
the connection micro service sends a write-in message to the cache micro service, wherein the write-in message comprises the equipment information of the network equipment to be connected with the controller;
a connection micro-service receives a keep-alive message periodically sent by the network equipment, wherein the keep-alive message is used for determining whether the network equipment and the connection micro-service keep connected or not;
and the connection micro-service sends a write-in message to the cache micro-service according to the received keep-alive message, wherein the write-in message comprises the equipment information of the network equipment which establishes connection with the controller.
7. An apparatus for monitoring the condition of a device, the apparatus comprising: the cache micro-service module is connected with the micro-service module and controls the micro-service module;
the cache micro-service module is used for receiving a write-in message sent by the connection micro-service module, wherein the write-in message comprises equipment information of network equipment which is connected with the controller or is to be connected;
the cache micro-service module is used for setting survival time for the network equipment according to the write-in message and starting a timer associated with the survival time or updating a timer corresponding to the network equipment, wherein the timer is used for starting timing when the cache micro-service receives the write-in message aiming at the network equipment;
when the timer for the network device exceeds the lifetime, the cache micro-service module does not receive a write-in message for the network device sent by the connection micro-service module, and the cache micro-service module is used for setting the connection state of the network device and the cache micro-service module to be invalid or deleting the device information corresponding to the network device by the cache micro-service module;
the cache micro-service module receives a reading message which is periodically sent by the control micro-service module, wherein the reading message is used for reading the connection state between the network equipment and the connection micro-service module, which is recorded in the cache micro-service module.
8. The apparatus of claim 7,
the cache micro-service module is further configured to determine whether a timer corresponding to the network device exceeds a lifetime corresponding to the network device when the cache micro-service module receives a write-in message sent by the connection micro-service module and directed to the network device, and if the timer does not exceed the lifetime, the cache micro-service module updates the timer to an initial default state.
9. The apparatus according to claim 7, wherein after the cache micro service module sets the connection state between the network device and the connection micro service module to be invalid, if the cache micro service module receives a write message for the network device sent by the connection micro service module, the cache micro service module updates a timer corresponding to the network device to an initial default state so as to restart the timer.
10. The apparatus of any one of claims 7-9, wherein the control microservice module is configured to periodically poll the cache microservice module to obtain information stored in the cache microservice module, wherein the information stored in the cache microservice module comprises: the device information of the network device, the connection state between the network device and the connection micro-service module, and the identification of the connection micro-service module connected with the network device.
The control micro-service module is also used for determining the network equipment with a failed connection state and the connection micro-service module correspondingly connected with the network equipment according to the acquired information stored in the cache micro-service module;
the control micro-service module is also used for determining the fault type according to the connection state and sending an alarm, wherein the fault type comprises the fault of the network equipment or the fault of the connection micro-service module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010743891.5A CN111953562B (en) | 2020-07-29 | 2020-07-29 | Equipment state monitoring method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010743891.5A CN111953562B (en) | 2020-07-29 | 2020-07-29 | Equipment state monitoring method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111953562A true CN111953562A (en) | 2020-11-17 |
CN111953562B CN111953562B (en) | 2022-05-24 |
Family
ID=73338395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010743891.5A Active CN111953562B (en) | 2020-07-29 | 2020-07-29 | Equipment state monitoring method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111953562B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10260828A (en) * | 1997-03-19 | 1998-09-29 | Kofu Nippon Denki Kk | Information processor having control storage |
US7685368B1 (en) * | 2006-06-28 | 2010-03-23 | Emc Corporation | Methods and apparatus for removing data from a cache |
CN102298379A (en) * | 2011-08-22 | 2011-12-28 | 重庆电力设计院 | Ground wire status monitoring and management method, device and system |
CN102362251A (en) * | 2008-12-30 | 2012-02-22 | 法国电信公司 | User interface to provide enhanced control of an application program |
CN102420805A (en) * | 2010-09-27 | 2012-04-18 | 阿里巴巴集团控股有限公司 | Method, system and device for communication by virtue of socket connection |
US8260816B1 (en) * | 2010-05-20 | 2012-09-04 | Vmware, Inc. | Providing limited access to a file system on shared storage |
CN104865594A (en) * | 2015-04-28 | 2015-08-26 | 中国白城兵器试验中心 | Acoustic vibration wave bullet landing point detecting device |
CN107005823A (en) * | 2015-09-24 | 2017-08-01 | 联发科技股份有限公司 | Hint instructions enhancing in back-off timer control |
CN107463133A (en) * | 2017-08-24 | 2017-12-12 | 中山市佰明环保科技有限公司 | A kind of sewage disposal device and cloud server based on high in the clouds |
CN107852417A (en) * | 2016-05-11 | 2018-03-27 | 甲骨文国际公司 | Multi-tenant identity and data security management cloud service |
CN107948284A (en) * | 2017-11-24 | 2018-04-20 | 泰康保险集团股份有限公司 | A kind of service inserting method, equipment and system based on micro services framework |
CN109582472A (en) * | 2018-10-19 | 2019-04-05 | 华为技术有限公司 | A kind of micro services processing method and equipment |
US20190179663A1 (en) * | 2017-12-08 | 2019-06-13 | Sap Se | Generic communication architecture for cloud microservice infrastructure |
CN110069380A (en) * | 2019-03-20 | 2019-07-30 | 浙江工业大学 | A kind of evolution of Web distributed software and monitoring method based on micro services |
CN110210191A (en) * | 2019-03-20 | 2019-09-06 | 腾讯科技(深圳)有限公司 | A kind of data processing method and relevant apparatus |
-
2020
- 2020-07-29 CN CN202010743891.5A patent/CN111953562B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10260828A (en) * | 1997-03-19 | 1998-09-29 | Kofu Nippon Denki Kk | Information processor having control storage |
US7685368B1 (en) * | 2006-06-28 | 2010-03-23 | Emc Corporation | Methods and apparatus for removing data from a cache |
CN102362251A (en) * | 2008-12-30 | 2012-02-22 | 法国电信公司 | User interface to provide enhanced control of an application program |
US8260816B1 (en) * | 2010-05-20 | 2012-09-04 | Vmware, Inc. | Providing limited access to a file system on shared storage |
CN102420805A (en) * | 2010-09-27 | 2012-04-18 | 阿里巴巴集团控股有限公司 | Method, system and device for communication by virtue of socket connection |
CN102298379A (en) * | 2011-08-22 | 2011-12-28 | 重庆电力设计院 | Ground wire status monitoring and management method, device and system |
CN104865594A (en) * | 2015-04-28 | 2015-08-26 | 中国白城兵器试验中心 | Acoustic vibration wave bullet landing point detecting device |
CN107005823A (en) * | 2015-09-24 | 2017-08-01 | 联发科技股份有限公司 | Hint instructions enhancing in back-off timer control |
CN108337260A (en) * | 2016-05-11 | 2018-07-27 | 甲骨文国际公司 | Multi-tenant identity and data security management cloud service |
CN107852417A (en) * | 2016-05-11 | 2018-03-27 | 甲骨文国际公司 | Multi-tenant identity and data security management cloud service |
CN108322471A (en) * | 2016-05-11 | 2018-07-24 | 甲骨文国际公司 | Multi-tenant identity and data security management cloud service |
CN107463133A (en) * | 2017-08-24 | 2017-12-12 | 中山市佰明环保科技有限公司 | A kind of sewage disposal device and cloud server based on high in the clouds |
CN107948284A (en) * | 2017-11-24 | 2018-04-20 | 泰康保险集团股份有限公司 | A kind of service inserting method, equipment and system based on micro services framework |
US20190179663A1 (en) * | 2017-12-08 | 2019-06-13 | Sap Se | Generic communication architecture for cloud microservice infrastructure |
CN109582472A (en) * | 2018-10-19 | 2019-04-05 | 华为技术有限公司 | A kind of micro services processing method and equipment |
CN110069380A (en) * | 2019-03-20 | 2019-07-30 | 浙江工业大学 | A kind of evolution of Web distributed software and monitoring method based on micro services |
CN110210191A (en) * | 2019-03-20 | 2019-09-06 | 腾讯科技(深圳)有限公司 | A kind of data processing method and relevant apparatus |
Non-Patent Citations (3)
Title |
---|
ZHANG MEI等: "An investigative report on current long-term digital preservation situation among major Chinese libraries", 《CHINESE JOURNAL OF LIBRARY AND INFORMATION SCIENCE》 * |
付印金等: "Application-Aware Client-Side Data Reduction and Encryption of Personal Data in Cloud Backup Services", 《JOURNAL OF COMPUTER SCIENCE & TECHNOLOGY》 * |
吕屹: "软交换业务实现防火墙和地址转换设备穿越的技术方案", 《广东通信技术》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111953562B (en) | 2022-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2733788C (en) | Method and systems for redundant server automatic failover | |
EP2597818A1 (en) | Cluster management system and method | |
CN112738834A (en) | MESH networking network emergency management method and electronic equipment | |
JP2010103695A (en) | Cluster system, cluster server and cluster control method | |
US7499987B2 (en) | Deterministically electing an active node | |
CN112399455A (en) | Lora gateway control method and Lora communication system | |
CN101340377B (en) | Method, apparatus and system for data transmission in double layer network | |
CN102307194B (en) | Graceful restarting method and device for universal protocol process | |
CN100563263C (en) | In network storage service, realize the method and system of system high-available | |
CN111953562B (en) | Equipment state monitoring method and device | |
EP1497731B1 (en) | A method and a system for ensuring a bus and a control server | |
CN111865659B (en) | Main and standby controller switching method and device, controller and network equipment | |
CN109660428B (en) | High availability cluster system | |
CN112532454B (en) | Network management method of FC switching network system | |
CN113824595B (en) | Link switching control method and device and gateway equipment | |
CN112637337B (en) | Data processing method and device | |
JP2004235791A (en) | Method for altering setting of transmitter | |
JP3266904B2 (en) | Monitoring system in statically connected network | |
CN110890989A (en) | Channel connection method and device | |
JPH0991233A (en) | Network connection device | |
CN115190005B (en) | Redis-based high availability method of double-host system | |
CN116684660B (en) | IP camera takeover method, device, network video recorder and storage medium | |
CN106992883B (en) | Data control method and data control device | |
JP2000010949A (en) | Relay type decentralized health check control system and method | |
JPH09198103A (en) | Device state information method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |