Fault alarm method and device

By automating the acquisition of port identifiers from switch log files and generating fault alarm information, the problem of low efficiency in MAC address drift fault location in large Layer 2 networks is solved, enabling rapid fault location and handling.

CN116192607BActive Publication Date: 2025-11-07CHINESE PEOPLES LIBERATION ARMY UNIT 61096
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310020030.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2025-11-07
Estimated Expiration
2043-01-06

AI Technical Summary

Technical Problem

In existing technologies, the MAC address drift fault location of large Layer 2 networks is inefficient, relies on manual operation which is time-consuming and labor-intensive, and requires a high level of expertise, making it impossible to quickly locate faulty devices.

Method used

By receiving fault monitoring requests, obtaining port identifiers from log files, generating port resolution commands and sending them to the switch, receiving fault terminal attribute information returned by the switch, generating fault alarm information, and realizing automated location and alarm functions.

Benefits of technology

It improves fault location efficiency and emergency response efficiency, enabling non-professionals to detect equipment faults in a timely manner. It is applicable to existing network monitoring systems and has strong portability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192607B_ABST
    Figure CN116192607B_ABST
Patent Text Reader

Abstract

The application provides a fault alarm method and device, wherein the fault alarm method comprises the following steps: receiving a fault monitoring request, and obtaining a log file based on the fault monitoring request, wherein the log file contains at least one piece of log information; determining to-be-processed log information in the log file, and obtaining a port identifier in the to-be-processed log information; generating a port analysis command based on the port identifier, and sending the port analysis command to a switch; receiving fault terminal attribute information returned by the switch based on the port analysis command, and generating fault alarm information based on the fault terminal attribute information. The fault alarm method of the application generates fault alarm information based on fault terminal attribute information, and displays the fault alarm information, thereby improving the positioning efficiency of a fault device, and further improving the processing efficiency of a user on the fault device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a fault alarm method. This application also relates to a fault alarm device, a computing device, and a computer-readable storage medium. Background Technology

[0002] Layer 2 networks are widely used due to their convenient access, fast data forwarding speed, and ease of maintenance. However, MAC address drift frequently occurs during use, and MAC address drift fault location is a highly specialized task. Network administrators log into the switch to read system logs, analyze the logs to locate the faulty switch port, then resolve the switch port to obtain the MAC and IP addresses of the terminals connected to that port, and manually verify and locate the faulty terminal.

[0003] However, the above fault location methods have the following problems: 1. High requirements for personnel business capabilities. If network administrators lack professional knowledge and fault handling experience, they will be unable to handle the fault when it occurs. 2. Locating network terminals with complex connection relationships is time-consuming and laborious. 3. Faults cannot be quickly located by relying on manual handling. Summary of the Invention

[0004] In view of this, embodiments of this application provide a fault alarm method. This application also relates to a fault alarm device, a computing device, and a computer-readable storage medium, to solve the problems of low fault location efficiency and long fault location time in the prior art.

[0005] According to a first aspect of the embodiments of this application, a fault alarm method is provided, including:

[0006] Receive a fault monitoring request and obtain a log file based on the fault monitoring request, wherein the log file contains at least one log message;

[0007] Identify the log information to be processed in the log file and obtain the port identifier in the log information to be processed;

[0008] A port resolution command is generated based on the port identifier and sent to the switch;

[0009] The system receives fault terminal attribute information returned by the switch based on the port resolution command, and generates fault alarm information based on the fault terminal attribute information.

[0010] According to a second aspect of the embodiments of this application, a fault alarm device is provided, comprising:

[0011] The receiving module is configured to receive a fault monitoring request and acquire a log file based on the fault monitoring request, wherein the log file contains at least one piece of log information;

[0012] The acquiring module is configured to determine to-be-processed log information in the log file and acquire a port identifier in the to-be-processed log information.

[0013] The sending module is configured to generate a port resolution command based on the port identifier and send the port resolution command to a switch.

[0014] The generating module is configured to receive fault terminal attribute information returned by the switch based on the port resolution command and generate fault alarm information based on the fault terminal attribute information.

[0015] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, and the processor implements the steps of the fault alarm method when executing the computer instructions.

[0016] According to a fourth aspect of an embodiment of the present application, a computer readable storage medium is provided, which stores computer instructions, and the computer instructions implement the steps of the fault alarm method when executed by a processor.

[0017] The fault alarm method provided by the present application receives a fault monitoring request and acquires a log file based on the fault monitoring request, wherein the log file contains at least one piece of log information; determines to-be-processed log information in the log file and acquires a port identifier in the to-be-processed log information; generates a port resolution command based on the port identifier and sends the port resolution command to a switch; receives fault terminal attribute information returned by the switch based on the port resolution command and generates fault alarm information based on the fault terminal attribute information.

[0018] An embodiment of the present application implements that a client generates a port resolution command based on a port identifier of to-be-processed log information, and a switch executes the port resolution command, thereby saving time consumed by manual positioning, improving fault positioning efficiency and fault emergency handling efficiency; the client can generate fault alarm information based on fault terminal attribute information and display the fault alarm information on the client, so that non-professionals can also discover device fault conditions in time, thereby improving fault handling efficiency; in addition, the fault alarm method of the present application can be processed by relying on an existing network monitoring system, has strong portability, and is convenient to popularize. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a flowchart of a fault alarm method provided by an embodiment of the present application;

[0020] Figure 2 is a processing flow chart of a fault alarm method for monitoring satellite device A according to an embodiment of the present application;

[0021] Figure 3 is a processing flow chart of a fault alarm method for client H according to an embodiment of the present application;

[0022] Figure 4 is a structural diagram of a fault alarm device according to an embodiment of the present application;

[0023] Figure 5 is a structural block diagram of a computing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods have not been described in detail in order to avoid obscuring the present application.

[0025] The terminology used in this description of one or more embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the application. As used in this description and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0026] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, a first entity discussed below could later be discussed as a second entity, and similarly, a second entity discussed below could later be discussed as a first entity without departing from the scope of the present application. As used herein, the term "if' can be construed to mean "when" or "in response to determining" or "in response to a determination" or "in response to the fact that...."

[0027] First, the noun terms related to one or more embodiments of the present application are explained.

[0028] MAC address (Media Access Control Address): Media Access Control Address, also known as LAN address, MAC address, Ethernet address (Ethernet Address) or physical address (Physical Address), is a bit address used to confirm the location of network equipment.

[0029] Switch: a network device used for electric (optical) signal forwarding. The network device can provide exclusive electric signal passage for any two network nodes connected to the switch.

[0030] MAC address drift: refers to the phenomenon that a MAC address has two outgoing interfaces in the same VLAN, and the later learned outgoing interface covers the original outgoing interface.

[0031] ARP (Address Resolution Protocol): Address Resolution Protocol, is a TCP / IP protocol for obtaining physical address from IP address.

[0032] Syslog: an industry standard protocol that can be used to record device logs.

[0033] In the present application, a fault alarm method is provided, and the present application also relates to a fault alarm device, a computing device and a computer readable storage medium, which are described in detail one by one in the following embodiments.

[0034] Figure 1 A flowchart of a fault alarm method according to an embodiment of the present application is shown, which specifically includes the following steps:

[0035] Step 102: receiving a fault monitoring request and obtaining a log file based on the fault monitoring request, wherein the log file contains at least one log information.

[0036] At present, network transmission faults such as MAC address drift may occur in a large two-layer network, which may cause slow network response and network non-response. In order to timely locate the faulty equipment such as satellite equipment, technical personnel can quickly handle the fault problem. The fault alarm method of the embodiment receives a fault monitoring request, obtains a log file generated based on equipment operation based on the fault monitoring request, so as to determine fault log information in the log file, i.e. log information recorded when the equipment fails.

[0037] The fault monitoring request refers to a request for monitoring the operation of the equipment. The log file refers to a record file or a file set recording system operation events of the equipment, for example, a syslog log. The log file contains at least one log information, and the log information refers to part of the log data in the log file.

[0038] Specifically, the terminal receives the fault monitoring request, wherein the terminal refers to a terminal device capable of processing and displaying data, such as a client. For ease of description, the client is taken as an example in the following embodiments. The fault monitoring request is parsed to obtain the to-be-monitored equipment identifier, wherein the to-be-monitored equipment identifier refers to a field capable of uniquely representing the to-be-monitored equipment, such as an equipment ID number or an equipment number. The log file is obtained according to the to-be-monitored equipment identifier, and the log file contains at least one log information.

[0039] For example, after the client A receives the fault monitoring request, the client A parses the fault monitoring request to obtain the to-be-monitored equipment identifier m. The log file is obtained based on the to-be-monitored equipment identifier m.

[0040] Further, the specific method for receiving the fault monitoring request and obtaining the log file based on the fault monitoring request comprises:

[0041] The log file is collected in the log database of the switch based on the fault monitoring request.

[0042] The switch refers to a device capable of connecting multiple devices to enable network connection between the multiple devices. The switch can record the data transmission of the devices connected to the switch and generate corresponding log files. The log database refers to a database for storing log files in the switch. After the client receives the fault monitoring request, the log file corresponding to the to-be-monitored equipment identifier can be obtained in the log database of the switch based on the to-be-monitored equipment identifier in the fault monitoring request.

[0043] For example, the to-be-monitored equipment identifier n in the fault detection request is determined. The log file corresponding to the to-be-monitored equipment identifier n is obtained in the log database of the switch based on the to-be-monitored equipment identifier n.

[0044] By receiving the fault monitoring request and obtaining the log file in the log database of the switch based on the to-be-monitored equipment identifier in the fault monitoring request, the monitoring of the to-be-monitored equipment corresponding to the to-be-monitored equipment identifier can be realized, and thus the to-be-monitored equipment can be processed in time when the fault log information appears in the log file.

[0045] Step 104: Determine the to-be-processed log information in the log file, and obtain the port identifier in the to-be-processed log information.

[0046] The to-be-processed log information refers to log information that needs to be further processed, such as log information recording a MAC address drift fault of a device.

[0047] In actual application, the specific method for determining the to-be-processed log information in the log file includes:

[0048] Determining at least one to-be-processed log information in the log file based on a preset fault keyword.

[0049] The preset fault keyword refers to a field that can represent that the to-be-processed log information is fault log information, for example, the preset fault keyword is flapping. According to the fault keyword, log information containing the preset fault keyword can be determined in the log file, and the log information is taken as the to-be-processed log information. For example, based on the preset fault keyword flapping, the to-be-processed log information is queried in the log file.

[0050] Specifically, the preset fault keyword is obtained, the preset fault keyword is matched with log information in the log file, log information containing the preset fault keyword is determined, and the log information containing the preset fault keyword is taken as the to-be-processed log information, so as to subsequently determine the port identifier in the to-be-processed log information.

[0051] For example, the preset fault keyword flapping is determined, the log information matched with the preset fault keyword flapping is queried in the log file according to the preset keyword flapping, and the log information matched with the preset fault keyword flapping is taken as the to-be-processed log information.

[0052] In actual application, the method for obtaining the port identifier in the to-be-processed log information includes:

[0053] Obtaining the port identifier of each to-be-processed log based on a preset port keyword.

[0054] The preset port keyword refers to a field that can represent that the log information is port information, for example, the preset port keyword is interface. According to the preset port keyword, the port identifier can be queried in the to-be-processed log information.

[0055] For example, based on the preset fault keyword flapping, the to-be-processed log information recording the MAC address drift is obtained in the log file, and based on the preset port keyword interface, the port number corresponding to the device that has the MAC address drift is obtained in the to-be-processed log information.

[0056] The log information to be processed is determined in the log file based on a preset fault keyword, that is, fault log information in the log file is determined, so that a port corresponding to a terminal that has failed is determined based on the log information to be processed subsequently; and a port identifier is obtained based on a preset port keyword, so that a port analysis command is generated based on the port identifier subsequently.

[0057] In step 106, the port analysis command is generated based on the port identifier and is sent to the switch.

[0058] The port analysis command is a command for analyzing a terminal corresponding to the port identifier; after the port analysis command is generated based on the port identifier, the port analysis command is sent to the switch; the switch can execute the port analysis command to obtain device attribute information of a device corresponding to the port identifier, such as a device MAC address; and the switch in this embodiment refers to a switch having a connection relationship with a device to be monitored.

[0059] Specifically, after the port identifier is obtained, the port analysis command is generated based on the port identifier; the port analysis command is sent to the switch; after the switch receives the port analysis command, the port analysis command is executed, and device attribute information obtained by executing the port analysis command is returned to a client that sends the port analysis command.

[0060] For example, the port analysis command is generated based on the port identifier f; the port analysis command is sent to a corresponding switch; the switch receives the port analysis command and performs ARP analysis on a terminal device corresponding to the port to determine the MAC address of the terminal device.

[0061] The port analysis command is generated and sent to the switch, so that the switch can receive the port analysis command and execute the port analysis command; subsequently, the switch can obtain device attribute information by executing the port analysis command to determine the location and name of a fault terminal, so as to subsequently alarm the fault device based on the device attribute information.

[0062] In actual applications, in order to send the port analysis command to the switch so that the switch can receive the port analysis command and thus the client can manage and control the switch, before the port analysis command is generated based on the port identifier and is sent to the switch, the following steps are further included:

[0063] The switch is remotely logged in based on a remote login protocol.

[0064] The remote login protocol refers to a standard protocol and a main mode of an Internet remote login service, for example, a Telnet protocol; the port analysis command input based on the remote login protocol can be executed in the switch, that is, the transmission connection between the client and the switch is realized through remote login of the client to the switch.

[0065] Specifically, before generating the port resolution command based on the port identifier, or before sending the generated port resolution command to the switch, the client can remotely log in to the switch based on a remote login protocol, thereby realizing the management and control of the switch by the client; in actual application, the client can also remotely log in to the switch based on the remote login protocol and a login security protocol at the same time, thereby ensuring the security of remote login.

[0066] For example, before generating the port resolution command based on the port identifier, the client logs in to the switch based on a Telnet protocol and an ssh protocol, wherein the ssh refers to a protocol for providing security for remote login sessions and other network services.

[0067] Further, in actual application, there can be multiple malfunctioning devices, i.e., multiple pieces of to-be-processed log information are contained in the log file, and at this time, the port identifier in each piece of to-be-processed log information needs to be determined, and a resolution command corresponding to each port identifier needs to be generated; the method for generating the port resolution command based on the port identifier and sending the port resolution command to the switch comprises:

[0068] generating a port resolution command corresponding to each port identifier based on each port identifier, and sending each port resolution command to the switch.

[0069] Specifically, the port identifier in each piece of to-be-processed log information is obtained in each piece of to-be-processed log information; a port resolution command corresponding to each port identifier is generated based on each port identifier; and the port resolution command corresponding to each port identifier is sent to the switch.

[0070] For example, after determining the port identifier set {port identifier 1, port identifier 2, port identifier 3} in each piece of to-be-processed log information, a port resolution command corresponding to each port identifier in the port set is generated based on each port identifier, including a port resolution command 1, a port resolution command 2, and a port resolution command 3; and the port resolution command 1, the port resolution command 2, and the port resolution command 3 are sent to the switch.

[0071] After receiving the port resolution command, the switch executes the port resolution command to obtain the fault terminal attribute information of the fault terminal corresponding to the port; and returns the fault terminal attribute information to the client.

[0072] By generating the port resolution command based on the port identifier and sending the port resolution command to the switch in a remote login manner, the switch can execute the received port resolution command to obtain the fault terminal attribute information, so that the client can subsequently receive the fault terminal attribute information, and further realize the alarm of the malfunctioning device by the client based on the fault terminal attribute information.

[0073] Step 108: receiving the fault terminal attribute information returned by the switch based on the port resolution command, and generating fault alarm information based on the fault terminal attribute information.

[0074] After the switch executes the port resolution command, the fault terminal attribute information of the resolution result is obtained, wherein the fault terminal attribute information includes terminal IP address and terminal MAC address; the switch returns the fault terminal attribute information to the client, and the client can query the terminal name information and the terminal location information of the fault terminal based on the fault terminal attribute information after receiving the fault terminal attribute information, that is, the fault alarm information can be generated based on the fault terminal attribute information.

[0075] The fault alarm information refers to a prompt message generated based on the fault terminal attribute information; the client can display the fault alarm information; the user using the client can directly determine which device has failed after seeing the fault alarm information, so that the relevant technical personnel can timely handle the fault.

[0076] In actual application, the fault alarm information generated based on the fault terminal attribute information includes:

[0077] The fault alarm information is generated based on the terminal name information, the terminal location information, the terminal IP address and the terminal MAC address.

[0078] Specifically, the fault terminal attribute information includes the terminal IP address and the terminal MAC address, and the terminal name information and the terminal location information of the fault terminal can be determined based on the terminal IP address and the terminal MAC address; after the fault alarm information is generated based on the terminal name information, the terminal location information, the terminal IP address and the terminal MAC address, the fault alarm information can be displayed in different forms, and the application does not limit the display mode; the user can determine the fault device and the location information of the fault device by checking the fault alarm information on the client, so that the relevant technical personnel can timely handle the fault device, thereby improving the processing efficiency of the fault device.

[0079] For example, in the case of MAC address drift failure, the satellite terminal D is determined as the fault terminal; the terminal name information and the terminal location information of the fault terminal are queried based on the terminal IP address and the terminal MAC address returned by the switch; the fault alarm information is generated based on the terminal IP address, the terminal MAC address, the terminal name information and the terminal location information, and the fault alarm information is displayed in the form of a pop-up window on the client.

[0080] The fault alarm method of the application receives a fault monitoring request, and acquires a log file based on the fault monitoring request, wherein the log file contains at least one log information; determines the to-be-processed log information in the log file, and acquires the port identifier in the to-be-processed log information; generates a port analysis command based on the port identifier, and sends it to a switch; receives the fault terminal attribute information returned by the switch based on the port analysis command, and generates fault alarm information based on the fault terminal attribute information.

[0081] By generating a port analysis command based on the to-be-processed log information port identifier by the client, and executing the port analysis command by the switch, the time consumed by manual positioning is saved, thereby improving the fault positioning efficiency and the fault emergency handling efficiency; the client can generate fault alarm information based on the fault terminal attribute information, and can display the fault alarm information on the client, so that non-professionals can also discover the equipment fault condition in time, thereby improving the fault handling efficiency; in addition, the fault alarm method of the application can be further processed relying on the existing network monitoring method, and has strong portability and is convenient to popularize.

[0082] The following describes the application in conjunction with the accompanying Figure 2 The application of the fault alarm method provided by the application in monitoring satellite equipment A is taken as an example to further describe the fault alarm method. Wherein, Figure 2 Fig. 1 shows a processing flowchart of a fault alarm method applied to monitor satellite equipment A according to an embodiment of the application, which specifically includes the following steps:

[0083] Step 202: receiving a fault monitoring request.

[0084] Specifically, the client G generates a fault monitoring request based on the monitoring demand, or receives a fault monitoring request sent by other terminals.

[0085] Step 204: collecting a log file in the log database of the switch based on the fault monitoring request.

[0086] Specifically, the fault monitoring request contains the to-be-monitored equipment identifier, and the to-be-monitored satellite equipment A can be determined based on the to-be-monitored equipment identifier; the log file corresponding to the satellite equipment A is acquired in the log database of the switch based on the to-be-monitored equipment identifier, wherein the log file contains at least one log information.

[0087] Step 206: determining at least one to-be-processed log information in the log file based on a preset fault keyword.

[0088] Specifically, the to-be-processed log information corresponding to the satellite equipment A is determined in the log file according to the preset fault keyword flapping, that is, the information corresponding to the MAC address drift fault occurring in the data transmission process.

[0089] Step 208: remotely logging into the switch based on a remote login protocol.

[0090] Specifically, remotely logging into the switch based on a Telnet protocol and an ssh protocol.

[0091] Step 210: obtaining a port identifier of each to-be-processed log based on a preset port keyword.

[0092] Specifically, querying the port identifier as 3 in the to-be-processed log according to the preset port keyword interface.

[0093] Step 212: generating a port resolution command corresponding to each port identifier based on each port identifier, and sending each port resolution command to the switch.

[0094] Specifically, generating the port resolution command according to the port identifier 3, and sending the port resolution command to the switch.

[0095] Step 214: the switch executing the port resolution command, obtaining fault terminal attribute information, and returning the fault terminal attribute information to the client.

[0096] Specifically, the switch executing the ARP port resolution command, obtaining the terminal name information and the terminal location information of the satellite device A; and returning the terminal IP address and the terminal MAC address of the satellite device A to the client G.

[0097] Step 216: receiving the fault terminal attribute information returned by the switch based on the port resolution command, and generating fault alarm information based on the fault terminal attribute information.

[0098] Specifically, the client G receives the terminal IP address and the terminal MAC address of the satellite device A, and queries the terminal name information and the terminal location information of the satellite device A based on the terminal IP address and the terminal MAC address of the satellite device A, and generates the fault alarm information for the satellite device A based on the terminal name information, the terminal location information, the terminal IP address and the terminal MAC address.

[0099] The fault alarm method of the application receives a fault monitoring request, and obtains a log file based on the fault monitoring request, wherein the log file contains at least one log information; determines to-be-processed log information in the log file, and obtains a port identifier in the to-be-processed log information; generates a port resolution command based on the port identifier, and sends it to a switch; receives fault terminal attribute information returned by the switch based on the port resolution command, and generates fault alarm information based on the fault terminal attribute information.

[0100] The fault alarm method of the embodiment can display the terminal name information, the terminal location information, the terminal IP address and the terminal MAC address of the satellite device A having the MAC address drift fault on the client, thereby improving the rapid positioning capability of the MAC address drift fault and improving the emergency disposal capability of the fault.

[0101] The following describes the fault alarm method in combination with the accompanying Figure 3 The fault alarm method is further described below by taking the application of the fault alarm method provided in the application to the client H as an example. In the application, Figure 3 Fig. 1 shows a processing flow diagram of a fault alarm method applied to a client H according to an embodiment of the application, which specifically includes the following steps:

[0102] Step 302: receiving a fault monitoring request and obtaining syslog logs.

[0103] Step 304: scanning the syslog logs.

[0104] Step 306: matching the flapping keyword in the syslog log information.

[0105] Step 308: determining whether the log information is successfully matched with the flapping keyword. If yes, step 310 is performed; if no, step 302 is continuously performed.

[0106] Step 310: searching the keyword interface in the log information to obtain a port address.

[0107] Step 312: generating a port address resolution command based on the port address.

[0108] Step 314: remotely logging in the switch.

[0109] Step 316: performing ARP resolution on the terminal connected to the port by the switch.

[0110] Step 318: obtaining the MAC address and the IP address of the fault terminal.

[0111] Step 320: obtaining the terminal location information and the terminal name information of the terminal satellite based on the MAC address and the IP address of the fault terminal.

[0112] Step 322: generating fault positioning information based on the MAC address, the IP address, the terminal location information and the terminal name information of the fault terminal.

[0113] The client H in the embodiment is provided with a data acquisition module, an editable processing module, a remote management module and a resource processing module.

[0114] The data acquisition module is configured to acquire monitoring data of a terminal satellite, i.e., a terminal satellite, and store the acquired monitoring data into a database. The data acquisition module includes device performance data acquisition and syslog log acquisition, and is mainly configured to acquire network device performance monitoring data and syslog log data, i.e., to execute steps 302-308.

[0115] The editable batch processing module is configured to analyze state parameters of all network devices, and to collect and analyze parameters representing device states to form a command set for network device state detection. A network administrator can detect states and performance of network devices by calling different device state detection command sets, i.e., to execute steps 310-312.

[0116] The remote management module is configured to enable a terminal to remotely log in to a switch through Telnet and ssh, and to manage and control the switch, i.e., to execute steps 314-318.

[0117] The asset management module is configured to uniformly manage device asset information, and to input, store, and query detailed information of the device, including type, source, IP address, mac address, location information, and a unit to which the device belongs, i.e., to execute steps 318-320.

[0118] The fault alarm method of the embodiment can significantly improve the rapid positioning capability of MAC address drift faults and the emergency disposal capability of the faults. The system constructed in the embodiment has a simple structure and can be easily constructed based on an existing network monitoring system. In addition, the fault alarm method of the application has a weak coupling, strong cohesion, and strong portability, and is convenient to popularize.

[0119] Corresponding to the method embodiments, the application further provides fault alarm device embodiments, Figure 4 A structure diagram of a fault alarm device is shown. As shown in the figure, Figure 4 The device includes:

[0120] The receiving module 402 is configured to receive a fault monitoring request and acquire a log file based on the fault monitoring request, wherein the log file contains at least one log information.

[0121] The acquisition module 404 is configured to determine to-be-processed log information in the log file and acquire a port identifier in the to-be-processed log information.

[0122] The sending module 406 is configured to generate a port analysis command based on the port identifier and send the port analysis command to a switch.

[0123] The generating module 408 is configured to receive the fault terminal attribute information returned by the switch based on the port resolution command, and generate fault alarm information based on the fault terminal attribute information.

[0124] Optionally, the receiving module 402 is further configured to:

[0125] Collect log files in a log database of the switch based on the fault monitoring request.

[0126] Optionally, the obtaining module 404 is further configured to:

[0127] Determine at least one to-be-processed log information in the log files based on a preset fault keyword.

[0128] Optionally, the apparatus further comprises a login module, which is configured to:

[0129] Remotely log in the switch based on a remote login protocol.

[0130] Optionally, the obtaining module 404 is further configured to:

[0131] Obtain a port identifier of each to-be-processed log based on a preset port keyword.

[0132] Optionally, the sending module 406 is further configured to:

[0133] Generate a port resolution command corresponding to each port identifier based on each port identifier, and send each port resolution command to the switch.

[0134] Optionally, the generating module 408 is further configured to:

[0135] Generate fault alarm information based on terminal name information, terminal location information, a terminal IP address, and a terminal MAC address.

[0136] The fault alarm apparatus of the present application comprises a receiving module, which receives a fault monitoring request and obtains log files based on the fault monitoring request, wherein the log files contain at least one log information; an obtaining module, which determines to-be-processed log information in the log files and obtains a port identifier in the to-be-processed log information; a sending module, which generates a port resolution command based on the port identifier and sends it to a switch; and a generating module, which receives fault terminal attribute information returned by the switch based on the port resolution command, and generates fault alarm information based on the fault terminal attribute information.

[0137] By generating a port analysis command based on the to-be-processed log information port identifier by the client, and executing the port analysis command by the switch, time consumed by manual positioning is saved, thereby improving fault positioning efficiency and fault emergency processing efficiency; the client can generate fault alarm information based on fault terminal attribute information, and can display the fault alarm information on the client, so that non-professionals can also discover device fault conditions in time, thereby improving fault processing efficiency; in addition, the fault alarm device of the application adopts a modular structure with strong cohesion and weak coupling, has strong portability, and is convenient to popularize.

[0138] The above is a schematic scheme of the fault alarm device of the embodiment. It should be noted that the technical scheme of the fault alarm device and the technical scheme of the fault alarm method described above belong to the same concept, and the details of the technical scheme of the fault alarm device that are not described in detail can be referred to the description of the technical scheme of the fault alarm method.

[0139] Figure 5 A structural block diagram of a computing device 500 according to an embodiment of the application is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 through a bus 530, and a database 550 is used to save data.

[0140] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 can include one or more of any type of network interface (e.g., network interface card (NIC)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like, wired or wireless.

[0141] In an embodiment of the application, the above-mentioned components of the computing device 500 and other components not shown in the above Figure 5 may be connected to each other, for example, through a bus. It should be understood that Figure 5 The structural block diagram of the computing device shown is only for the purpose of example, and is not a limitation on the scope of the application. Those skilled in the art can add or replace other components as needed.

[0142] The computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. The computing device 500 can also be a mobile or stationary server.

[0143] The processor 520 implements the steps of the failure alarm method when executing the computer instructions.

[0144] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device belongs to the same concept as the technical scheme of the failure alarm method described above, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the failure alarm method.

[0145] An embodiment of the present application further provides a computer readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the failure alarm method as described above.

[0146] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium belongs to the same concept as the technical scheme of the failure alarm method described above, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the failure alarm method.

[0147] The specific embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, acts or steps recited in the claims can be performed in an order other than that recited in the embodiments, and still achieve desirable results. Also, the process depicted in the figures does not necessarily require the particular order shown, or sequential order to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous.

[0148] The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium can include appropriate additions or subtractions according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.

[0149] It should be noted that for the foregoing method embodiments, the descriptions are all expressed as a combination of a series of actions for the sake of simplicity, but those skilled in the art should know that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0150] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0151] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The alternative embodiments do not describe all the details and do not limit the present application to the specific embodiments described. Obviously, according to the content of the present application, many modifications and changes can be made. The present application selects and describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is limited by the claims and their entire scope and equivalents.

Claims

1. A failure alarm method characterized by comprising: The method comprises the following steps: receiving a fault monitoring request and obtaining a log file based on the fault monitoring request, wherein the log file contains at least one piece of log information; determining to-be-processed log information in the log file and obtaining a port identifier in the to-be-processed log information, wherein the determination of the to-be-processed log information in the log file comprises: obtaining to-be-processed log information recording MAC address drift in the log file based on a preset fault keyword; generating a port resolution command based on the port identifier and sending the port resolution command to a switch; receiving fault terminal attribute information returned by the switch based on the port resolution command and generating fault alarm information based on the fault terminal attribute information.

2. The failure alarm method of claim 1, wherein, The method comprises the following steps: obtaining a log file based on the fault monitoring request comprises:

3. The failure alarm method of claim 1, wherein, collecting a log file in a log database of the switch based on the fault monitoring request. Before the step of generating a port resolution command based on the port identifier and sending the port resolution command to a switch, the method further comprises the following step:

4. The failure alarm method of claim 1, wherein, remotely logging into the switch based on a remote login protocol. The step of obtaining a port identifier in the to-be-processed log information comprises the following step:

5. The failure alarm method of claim 4, wherein, obtaining a port identifier of each to-be-processed log based on a preset port keyword. The step of generating a port resolution command based on the port identifier and sending the port resolution command to a switch comprises the following steps:

6. The failure alarm method of claim 1, wherein, generating a port resolution command corresponding to each port identifier based on each port identifier and sending each port resolution command to the switch. The step of generating fault alarm information based on the fault terminal attribute information comprises the following step:

7. A fault alerting device, characterized by generating fault alarm information based on terminal name information, terminal location information, a terminal IP address and a terminal MAC address. The method comprises the following steps: a receiving module configured to receive a fault monitoring request and obtain a log file based on the fault monitoring request, wherein the log file contains at least one piece of log information; an obtaining module configured to determine to-be-processed log information in the log file and obtain a port identifier in the to-be-processed log information, wherein the determination of the to-be-processed log information in the log file comprises: obtaining to-be-processed log information recording MAC address drift in the log file based on a preset fault keyword; a sending module configured to generate a port resolution command based on the port identifier and send the port resolution command to a switch; 8. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein, a generating module configured to receive fault terminal attribute information returned by the switch based on the port resolution command and generate fault alarm information based on the fault terminal attribute information.

9. A computer-readable storage medium storing computer instructions, wherein, The processor executes the computer instructions to implement the steps of the method of any one of claims 1-6. The computer instructions are executed by the processor to implement the steps of the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Port fault handling method and system, storage medium and electronic equipment

    CN113791928A