CN110691009A - Network equipment inspection method and device - Google Patents

Network equipment inspection method and device Download PDF

Info

Publication number
CN110691009A
CN110691009A CN201910961413.9A CN201910961413A CN110691009A CN 110691009 A CN110691009 A CN 110691009A CN 201910961413 A CN201910961413 A CN 201910961413A CN 110691009 A CN110691009 A CN 110691009A
Authority
CN
China
Prior art keywords
inspection
equipment
network equipment
target network
target
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
Application number
CN201910961413.9A
Other languages
Chinese (zh)
Other versions
CN110691009B (en
Inventor
王博学
李彦君
胡章丰
任秋峥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN201910961413.9A priority Critical patent/CN110691009B/en
Publication of CN110691009A publication Critical patent/CN110691009A/en
Application granted granted Critical
Publication of CN110691009B publication Critical patent/CN110691009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for inspecting network equipment, wherein the method for inspecting the network equipment comprises the following steps: acquiring equipment connection information of target network equipment to be inspected; establishing network connection with the target network equipment according to the equipment connection information; acquiring a target inspection scheme matched with target network equipment, wherein the target inspection scheme comprises at least one inspection command, and the inspection command is used for acquiring running state information of the target network equipment; sequentially executing at least one inspection command included in the target inspection scheme to obtain at least one inspection result character string, wherein the inspection result character string includes running state information of the target network equipment; aiming at each inspection result character string, extracting first running state information from the inspection result character string; and storing the extracted first operation state information into an equipment information database. The scheme can improve the efficiency of polling the network equipment.

Description

Network equipment inspection method and device
Technical Field
The invention relates to the technical field of computers, in particular to a network equipment inspection method and device.
Background
With the continuous development and progress of computer technology and cloud computing technology, cloud platforms are widely applied to various fields in production and life, and with the increase of data volume and the improvement of requirements on data processing speed, the number of physical network devices such as switches, routers, firewalls, load balancers and the like included in a cloud platform network is continuously increased, and the physical network devices can work normally to determine that the cloud platform network can run normally. In order to prevent the cloud platform network from being incapable of working normally due to the influence of the network equipment fault, the network equipment needs to be regularly checked to check the working state of the network equipment and timely find out possible problems.
At present, when a network device is inspected, a network operation and maintenance person is required to log in the network device, obtain corresponding operation parameters by executing a related command, and then judge the operation state of the network device according to the obtained operation parameters and artificial experience.
Aiming at the current method for polling network equipment, the polling of each network equipment needs network operation and maintenance personnel to perform equipment login, command execution and operation parameter judgment and analysis, so that longer time is needed for completing polling of one network equipment, and the polling efficiency of the network equipment is lower.
Disclosure of Invention
The embodiment of the invention provides a method and a device for polling network equipment, which can improve the efficiency of polling the network equipment.
In a first aspect, an embodiment of the present invention provides a method for polling network devices, including:
acquiring equipment connection information of target network equipment, wherein the target network equipment is network equipment to be inspected, and the equipment connection information is used for connecting to the target network equipment;
establishing network connection with the target network equipment according to the equipment connection information;
acquiring a target inspection scheme matched with the target network equipment, wherein the target inspection scheme comprises at least one inspection command, and the inspection command is used for acquiring running state information of the target network equipment;
sequentially executing the at least one inspection command included in the target inspection scheme to obtain at least one inspection result character string, wherein the inspection result character string includes the running state information of the target network equipment;
aiming at each inspection result character string, extracting first running state information from the inspection result character string;
and storing each extracted first operation state information into an equipment information database.
Optionally, the obtaining the device connection information of the target network device includes:
judging whether network connection is established with the target network equipment or not;
if the network connection with the target network equipment is not established before, sending an information input request to a user, and receiving the equipment connection information input by the user according to the information input request;
and if network connection with the target network equipment is established before, acquiring the equipment connection information of the target network equipment from the equipment information database.
Optionally, after the receiving the device connection information input by the user according to the information input request, further comprising:
and storing the received equipment connection information into the equipment information database.
Optionally, the obtaining of the target inspection scheme matched with the target network device includes:
judging whether the current polling is the first polling of the target network equipment or not;
if the current inspection is to inspect the target network equipment for the first time, loading at least one first inspection command matched with the model of the target network equipment in an inspection command pool, determining at least one second inspection command selected by a user from the loaded at least one first inspection command, and taking the set of the determined at least one second inspection command as the target inspection scheme matched with the target network equipment box;
and if the current polling is not the first polling of the target network equipment, determining a polling scheme used when the target network equipment is polled last time as the target polling scheme for polling the target network equipment at the current time.
Optionally, after the storing the extracted first operating status information into the device information database, the method further includes:
acquiring each second running state information extracted when the target network equipment is patrolled last time;
and comparing each piece of first operation state information extracted in the current inspection with each piece of acquired second operation state information to generate an inspection report.
In a second aspect, an embodiment of the present invention further provides a network device inspection apparatus, including:
the system comprises a connection information acquisition module, a connection information acquisition module and a connection information acquisition module, wherein the connection information acquisition module is used for acquiring the equipment connection information of target network equipment, the target network equipment is to-be-inspected network equipment, and the equipment connection information is used for connecting to the target network equipment;
the device connection module is used for establishing network connection with the target network device according to the device connection information acquired by the connection information acquisition module;
the system comprises a routing inspection scheme acquisition module, a routing inspection scheme acquisition module and a routing inspection module, wherein the routing inspection scheme acquisition module is used for acquiring a target routing inspection scheme matched with target network equipment, the target routing inspection scheme comprises at least one routing inspection command, and the routing inspection command is used for acquiring running state information of the target network equipment;
the equipment inspection module is used for sequentially executing the at least one inspection command included in the target inspection scheme acquired by the inspection scheme acquisition module after the equipment connection module establishes network connection with the target network equipment, and acquiring at least one inspection result character string, wherein the inspection result character string includes running state information of the target network equipment;
the equipment inspection module is used for acquiring inspection result character strings of equipment;
and the inspection result storage module is used for storing the first running state information extracted by the inspection result extraction module into an equipment information database.
Optionally, the connection information obtaining module includes:
a first judging unit, configured to judge whether a network connection is established with the target network device before;
a first information obtaining unit, configured to send an information input request to a user and receive the device connection information input by the user according to the information input request when the first determining unit determines that a network connection with the target network device has not been established before;
a second information obtaining unit, configured to obtain the device connection information of the target network device from the device information database when the first determining unit determines that a network connection has been established with the target network device before.
Optionally, the connection information obtaining module further includes:
an information storage unit, configured to store the device connection information received by the first information acquisition unit in the device information database.
Optionally, the patrol scheme acquiring module includes:
the second judging unit is used for judging whether the current polling is the first polling on the target network equipment or not;
a first scheme obtaining unit, configured to, when the second determining unit determines that the current round inspection is the first round inspection of the target network device, load at least one first round inspection command matching the model of the target network device in a round inspection command pool, determine at least one second round inspection command selected by a user from the loaded at least one first round inspection command, and use a set of the determined at least one second round inspection command as the target round inspection scheme matching the target network device box;
and the second scheme acquisition unit is used for determining the routing inspection scheme used when the target network equipment is last routed as the target routing inspection scheme for routing inspection of the target network equipment at the current time when the second judgment unit determines that the current routing inspection is not the first routing inspection of the target network equipment.
Optionally, the network device inspection device further includes:
the historical inspection data acquisition module is used for acquiring each second running state information extracted when the target network equipment is inspected last time;
and the inspection report generating module is used for comparing the first running state information extracted by the inspection result extracting module with the second running state information acquired by the historical inspection data acquiring module to generate an inspection report.
According to the technical scheme, when a target network device needs to be inspected, firstly, device connection information used for being connected to the target network device is obtained, then, network connection with the target network device is established according to the obtained device connection information, then, a target inspection scheme matched with the target network device is obtained, each inspection command included in the target inspection scheme is executed in sequence, at least one inspection result character string is obtained, then, first operation state information used for representing the operation state of the target network device is extracted from each inspection result character string, and the extracted first operation state information is stored in a device information database. Therefore, the equipment connection information of the network equipment is stored in advance and the routing inspection scheme is configured, when the network equipment needs to be routed, the network equipment can be automatically connected to the network equipment according to the equipment connection information, routing inspection commands included in the routing inspection scheme matched with the network equipment are automatically executed, the running state information representing the network equipment is obtained, the obtained running state information is stored in the equipment information database, network operation and maintenance personnel only need to read routing inspection results from the equipment information database, the network operation and maintenance personnel do not need to manually log in the equipment, execute the commands and judge and analyze running parameters, the time for routing inspection of the network equipment is shortened, and therefore the routing inspection efficiency of the network equipment can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for polling a network device according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for acquiring device connection information according to an embodiment of the present invention;
fig. 3 is a flowchart of a polling scheme acquiring method according to an embodiment of the present invention;
fig. 4 is a flowchart of another polling method for network devices according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a device where a network device inspection device is located according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a network equipment inspection device according to an embodiment of the invention;
FIG. 7 is a schematic diagram of another network equipment inspection device provided by one embodiment of the invention;
FIG. 8 is a schematic diagram of yet another network equipment inspection device provided by an embodiment of the invention;
FIG. 9 is a schematic diagram of yet another network equipment inspection device provided in accordance with an embodiment of the present invention;
fig. 10 is a schematic diagram of a network equipment inspection device including an inspection report generation module according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for polling network devices, where the method may include the following steps:
step 101: acquiring equipment connection information of target network equipment, wherein the target network equipment is network equipment to be inspected, and the equipment connection information is used for connecting to the target network equipment;
step 102: establishing network connection with the target network equipment according to the equipment connection information;
step 103: acquiring a target inspection scheme matched with target network equipment, wherein the target inspection scheme comprises at least one inspection command, and the inspection command is used for acquiring running state information of the target network equipment;
step 104: sequentially executing at least one inspection command included in the target inspection scheme to obtain at least one inspection result character string, wherein the inspection result character string includes running state information of the target network equipment;
step 105: aiming at each inspection result character string, extracting first running state information from the inspection result character string;
step 106: and storing the extracted first operation state information into an equipment information database.
In the embodiment of the invention, when a target network device needs to be inspected, firstly, device connection information used for being connected to the target network device is obtained, then, network connection with the target network device is established according to the obtained device connection information, then, a target inspection scheme matched with the target network device is obtained, each inspection command included in the target inspection scheme is executed in sequence, at least one inspection result character string is obtained, then, first operation state information used for representing the operation state of the target network device is extracted from each inspection result character string, and the extracted first operation state information is stored in a device information database. Therefore, the equipment connection information of the network equipment is stored in advance and the routing inspection scheme is configured, when the network equipment needs to be routed, the network equipment can be automatically connected to the network equipment according to the equipment connection information, routing inspection commands included in the routing inspection scheme matched with the network equipment are automatically executed, the running state information representing the network equipment is obtained, the obtained running state information is stored in the equipment information database, network operation and maintenance personnel only need to read routing inspection results from the equipment information database, the network operation and maintenance personnel do not need to manually log in the equipment, execute the commands and judge and analyze running parameters, the time for routing inspection of the network equipment is shortened, and therefore the routing inspection efficiency of the network equipment can be improved.
In the embodiment of the invention, in order to acquire the running state information of the target network device when the patrol command is executed, the network connection with the target network device needs to be established first, and the device connection information is an essential parameter for establishing the network connection with the target network device. The device connection information may include information such as an IP address, login username, login password, MAC address, etc. of the target network device.
In the embodiment of the invention, each network device has a matched routing inspection scheme, and routing inspection schemes matched with different types of network devices may be different. The inspection scheme comprises one or more inspection commands, each inspection command is used for detecting one or more inspection items of the network equipment, and the inspection items comprise equipment information, equipment brands, equipment models, equipment placement positions, equipment performance parameters, equipment content sizes, equipment slot positions, equipment serial numbers, equipment purchase years, equipment warranty states, equipment spare part conditions, equipment label integrity degrees and the like.
Optionally, on the basis of the network device inspection method shown in fig. 1, different manners may be adopted to obtain the device connection information of the target network device according to whether a network connection is established with the target network device before. As shown in fig. 2, the method for acquiring device connection information may include the following steps:
step 201: judging whether network connection is established with the target network equipment or not, if so, executing a step 202, otherwise, executing a step 204;
step 202: sending an information input request to a user, wherein the information input request is used for prompting the user to input the equipment connection information of the target network equipment;
step 203: receiving equipment connection information input by a user according to the information input request, and finishing the current process;
step 204: and acquiring the device connection information of the target network device from the device information database.
In the embodiment of the present invention, for any network device that needs to perform polling, if a network connection with the network device has not been successfully established before, it indicates that the device connection information of the network device cannot be stored in the device information database, and at this time, an information input request needs to be sent to a user to request the user to input the device connection information of the network device, so as to establish a network connection with the network device according to the device connection information input by the user. If the network connection with the network device has been successfully established before, it indicates that the device connection information of the network device should be stored in the device information database, and at this time, the device connection information of the network device may be directly read from the device information database.
In the embodiment of the invention, for the network equipment which has successfully established the network connection before, the equipment connection information of the network equipment is stored in the equipment information database, when the network equipment needs to be inspected again, the network connection with the network equipment can be automatically established only by reading the equipment connection information of the network equipment from the equipment information database, and the network operation and maintenance personnel do not need to input the equipment connection information again, so that the working intensity of the operation and maintenance personnel in the process of inspecting the network equipment can be reduced, and the efficiency of inspecting the network equipment can be further improved.
Optionally, on the basis of the device connection information acquiring method shown in fig. 2, if it is determined that the network connection with the target network device has not been established before, after receiving the device connection information input by the user, the received device connection information may be stored in the device information database, in addition to establishing the network connection with the target network device according to the received device connection information.
In the embodiment of the invention, aiming at any network equipment, after the network connection with the network equipment is established for the first time for inspection, the equipment connection information of the network equipment is stored in the equipment information database, and when the network equipment is inspected again subsequently, the equipment connection information of the network equipment can be directly read from the equipment information database to establish the network connection, so that the network operation and maintenance personnel do not need to input the equipment connection information every time, the time for the network operation and maintenance personnel to input the equipment connection information is saved, and the efficiency of inspecting the network equipment can be improved.
Optionally, on the basis of the method for routing inspection of network devices shown in fig. 1, different manners may be adopted to obtain a target routing inspection scheme matched with the target network device according to whether the target network device has been routed before. As shown in fig. 3, the method for obtaining the target inspection plan may include the following steps:
step 301: judging whether the current polling is the first polling of the target network equipment, if so, executing the step 302, otherwise, executing the step 303;
step 302: loading at least one first inspection command matched with the model of the target network equipment in the inspection command pool;
step 303: determining at least one second inspection command selected by the user from the loaded at least one first inspection command, taking the set of the determined at least one second inspection command as a target inspection scheme matched with the target network equipment box, and ending the current process;
step 304: and determining the routing inspection scheme used when the target network equipment is subjected to routing inspection last time as the target routing inspection scheme for routing inspection of the target network equipment at the current time.
In the embodiment of the invention, for any network equipment needing to be patrolled, if the current patrol is the first patrol, the patrol scheme matched with the network equipment is not configured before, and at the moment, each first patrol command matched with the model of the network equipment in a patrol command pool can be loaded, so that a user can select a second patrol command needing to be executed on the network equipment from the loaded first patrol commands, and then, a set of each second patrol command selected by the user is used as a target patrol scheme matched with the network equipment. If the current polling is not the first polling of the network equipment, the polling scheme used when the network equipment is polled last time is used as the target polling scheme for polling the network equipment at the current time.
In the embodiment of the invention, for the network equipment which is subjected to one or more times of polling, because the user configures the polling scheme for polling the network equipment before, when the network equipment is polled again, the network equipment can be polled directly according to the polling scheme configured by the user before, and a network operation and maintenance worker does not need to reconfigure the polling scheme when the network equipment is polled every time, so that the time for configuring the polling scheme in the polling process of the network equipment can be saved, and the polling efficiency of the network equipment is improved.
In the embodiment of the invention, the patrol command pool comprises a plurality of patrol commands for patrolling various types of network equipment, and each patrol command can be used for patrolling one or more network equipment to acquire corresponding equipment operation information. When the routing inspection command included in the routing inspection command pool cannot meet the routing inspection requirement of the user, the user can create a corresponding routing inspection command according to the requirement of the user, and the created routing inspection command is stored in the routing inspection command pool.
In the embodiment of the invention, the network equipment with the same model can be matched with the same polling scheme, when one network equipment is polled for the first time, whether the record for polling other network equipment with the same model as the network equipment exists can be searched from the historical polling record, and if the other network equipment with the same model as the network equipment is polled before, the network equipment can be polled according to the polling scheme used when the other network equipment with the same model is polled.
In the embodiment of the invention, one routing inspection scheme comprises one or more routing inspection commands, different routing inspection commands correspond to different routing inspection items, and one routing inspection command is used for acquiring one or more pieces of running state information of the network equipment. The main detection items of the inspection command comprise checking the state of a CPU, checking the state of a memory, checking the operating temperature, checking the state of a fan, checking the state of a port, checking a routing table and the like.
In the embodiment of the invention, after a network device is patrolled for the first time, the obtained patrol scheme matched with the network device can be stored in the device information database, and when the network device is patrolled for the second time, the patrol scheme matched with the network device can be directly obtained from the device information database.
Optionally, on the basis of the method for routing inspection of network devices shown in fig. 1, after storing the extracted first operating state information in the device information database, the second operating state information extracted when the target network device is last routed may be obtained, and then a routing inspection report for routing inspection of the target network device may be obtained by comparing the extracted first operating state information with the extracted second operating state information.
In the embodiment of the invention, after the first running state information serving as the current inspection result is obtained, the second running state information serving as the inspection result when the target network equipment is inspected last time is read from the equipment information database, and then the first running state information and the second running state information are stored in the table for comparison, so that the inspection report is obtained. The network operation and maintenance personnel can determine the current operation state of the network equipment through the inspection report and also can determine the operation state change condition of the network equipment, and the network operation and maintenance personnel do not need to analyze and compare inspection results manually, so that the work efficiency of the network operation and maintenance personnel is improved.
In the above embodiments, after the inspection of the network device is completed, the connection with the network device can be timely disconnected, so that the normal operation of the network device is ensured. In addition, if a plurality of network devices need to be inspected at the same time, a plurality of threads may be started, and each thread inspects a corresponding network device according to the method of each of the above embodiments. In addition, the polling of a network device may be started after receiving the trigger of the user, or may be triggered periodically according to a polling period configured by the user.
It should be noted that, the steps included in the foregoing embodiments are only split to better describe the network device inspection method provided by the present invention, and there may not be a strict sequence between the steps in the actual service implementation process, for example, step 103 may be executed before step 101, and step 103 may also be executed simultaneously with step 101.
The following describes the method for polling network devices according to the embodiment of the present invention in further detail by taking polling a switch X of a certain type as an example, and as shown in fig. 4, the method may include the following steps:
step 401: and judging whether the inspection of the switch X is carried out for the first time, if so, executing the step 402, otherwise, executing the step 403.
In the embodiment of the invention, when the switch X needs to be patrolled, whether the switch X is patrolled for the first time is judged, and then the patrol scheme matched with the switch X is obtained according to the judgment result.
Step 402: the tour inspection plan configured by the user is obtained and step 404 is performed.
In the embodiment of the invention, when the switch X is inspected for the first time, because the user does not configure the inspection scheme matched with the switch X before, each first inspection command matched with the type of the switch X in the inspection command pool can be loaded for the user to select the second inspection command to be executed on the switch X, and then the set of each second inspection command selected by the user is used as the inspection scheme matched with the switch X.
In addition, after the routing inspection scheme matched with the switch X is acquired, the acquired routing inspection scheme can be stored in the equipment information database for use in subsequent routing inspection of the switch X again.
Step 403: and acquiring the polling scheme used when polling the switch X last time.
In the embodiment of the invention, if the switch X is not inspected for the first time, the inspection scheme used for inspecting the switch X for the last time can be obtained from the equipment information database, and the user can be inquired whether the inspection scheme used for the last inspection needs to be modified or not, if the user confirms that the inspection scheme does not need to be modified, the inspection scheme used for the last inspection is used for the current inspection, and if the user confirms that the inspection scheme used for the last inspection needs to be modified, the inspection scheme modified by the user is used as the inspection scheme used for inspecting the switch X for the current time.
Step 404: it is determined whether a network connection has been previously established with switch X, if so, step 405 is performed, otherwise step 406 is performed.
In the embodiment of the present invention, the device connection information for connecting to the switch X is acquired in different ways according to whether a network connection is previously established with the switch X.
Step 405: the device connection information of the switch X is read from the device information database, and step 407 is performed.
In the embodiment of the present invention, the device connection information of the switch X is already stored in the device information database when the connection with the switch X is previously established, so that the inspection only needs to read the device connection information of the switch X from the device information database. The device connection information includes an IP address, a user name, and a login password of the switch X.
Step 406: and acquiring the equipment connection information input by the user.
In the embodiment of the present invention, if a network connection has not been previously established with the switch X, the user is requested to input the device connection information of the switch X. The device connection information of the switch X includes an IP address, a user name, and a login password of the switch X.
In addition, after the device connection information of the switch X input by the user is acquired, the device connection information of the switch X is stored in the device information database for use in next polling of the switch X.
Step 407: and establishing network connection with the switch X according to the equipment connection information.
In the embodiment of the invention, the acquired equipment connection information is used for being connected to the switch X through Netmiko to establish network connection with the switch X, so that the patrol command can be executed to acquire the operation state information of the switch X. Specifically, it can be connected to switch X through netmiko.
Step 408: and executing each polling command included in the polling scheme in sequence, and polling the switch X.
In the embodiment of the invention, after the network connection with the switch X is successfully established, the routing inspection commands included in the routing inspection scheme are sequentially executed, and each executed routing inspection command can detect the corresponding routing inspection item on the switch X to obtain the corresponding routing inspection result character string.
Step 409: and judging whether the polling on the switch X is successful, if so, executing the step 410, otherwise, executing the step 413.
In the embodiment of the present invention, after each polling command included in the polling scheme is executed, whether polling on the switch X is successful or not can be determined according to the execution condition of each polling command, if successful, the polling result can be stored, step 410 is correspondingly executed, and if unsuccessful, the corresponding error information is recorded, and step 413 is correspondingly executed.
Step 410: and respectively segmenting each inspection result character string to obtain required first running state information.
In the embodiment of the invention, each inspection command can be successfully executed to obtain a corresponding inspection result character string, and the required first running state information can be obtained by segmenting the inspection result character string.
For example, after executing the patrol command for checking the interface bandwidth, BW 10000Kbit/sec can be obtained by dividing the obtained patrol result character string, and the current interface bandwidth can be known to be 10Mbps through BW 10000 Kbit/sec.
Step 411: and storing the acquired first running state information into an equipment information database.
In the embodiment of the invention, after the first operation state information is extracted from each inspection result character string, each extracted first operation state information is stored in the equipment information database, so that each first operation state information is stored in the corresponding field.
Step 412: the patrol report is generated and stored locally and step 414 is performed.
In the embodiment of the invention, after the first running state information is stored in the equipment information database, the inspection result of the previous inspection of the switch X can be obtained, and the inspection result of the previous inspection are used for creating the excel table as the inspection report to be stored locally.
Step 413: the error information is stored.
In the embodiment of the invention, after the routing inspection of the switch X is determined to fail, the error information is stored into the fail file so as to be convenient for a user to check. Wherein, the next time the switchboard X is patrolled and examined, the failure record generated by this patrol and examine will be clear.
Step 414: the connection to switch X is broken.
As shown in fig. 5 and 6, an embodiment of the present invention provides a network device inspection apparatus. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. In terms of hardware, as shown in fig. 5, a hardware structure diagram of a device in which the network device inspection apparatus according to the embodiment of the present invention is located is shown, where in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 5, the device in which the apparatus is located in the embodiment may also include other hardware, such as a forwarding chip responsible for processing a packet, and the like. Taking a software implementation as an example, as shown in fig. 6, as a logical apparatus, the apparatus is formed by reading, by a CPU of a device in which the apparatus is located, corresponding computer program instructions in a non-volatile memory into a memory for execution. The network equipment inspection device that this embodiment provided includes:
a connection information obtaining module 601, configured to obtain device connection information of a target network device, where the target network device is a network device to be inspected, and the device connection information is used to connect to the target network device;
a device connection module 602, configured to establish a network connection with a target network device according to the device connection information acquired by the connection information acquisition module 601;
a polling scheme obtaining module 603, configured to obtain a target polling scheme matched with a target network device, where the target polling scheme includes at least one polling command, and the polling command is used to obtain running state information of the target network device;
an equipment polling module 604, configured to sequentially execute at least one polling command included in the target polling scheme acquired by the polling scheme acquisition module 603 after the equipment connection module 602 establishes a network connection with the target network equipment, and acquire at least one polling result character string, where the polling result character string includes running state information of the target network equipment;
a polling result extracting module 605, configured to extract, for each polling result character string obtained by the device polling module 604, first operation state information from the polling result character string;
and an inspection result storage module 606 for storing the first operation state information extracted by the inspection result extraction module 605 into the device information database.
In this embodiment of the present invention, the connection information obtaining module 601 may be configured to perform step 101 in the foregoing method embodiment, the device connecting module 602 may be configured to perform step 102 in the foregoing method embodiment, the inspection plan obtaining module 603 may be configured to perform step 103 in the foregoing method embodiment, the device inspection module 604 may be configured to perform step 104 in the foregoing method embodiment, the inspection result extracting module 605 may be configured to perform step 105 in the foregoing method embodiment, and the inspection result storing module 606 may be configured to perform step 106 in the foregoing method embodiment.
Optionally, on the basis of the network device inspection apparatus shown in fig. 6, as shown in fig. 7, the connection information obtaining module 601 includes:
a first determining unit 6011, configured to determine whether a network connection is established with a target network device before;
a first information obtaining unit 6012, configured to send an information input request to a user and receive device connection information input by the user according to the information input request when the first determining unit 6011 determines that a network connection with a target network device is not established before;
a second information obtaining unit 6013, configured to obtain the device connection information of the target network device from the device information database when the first determining unit 6011 determines that a network connection has been established with the target network device before.
In the embodiment of the present invention, the first determining unit 6011 may be configured to perform step 201 in the above-described method embodiment, the first information acquiring unit 6012 may be configured to perform step 202 and step 203 in the above-described method embodiment, and the second information acquiring unit 6013 may be configured to perform step 204 in the above-described method embodiment.
Optionally, on the basis of the network device inspection apparatus shown in fig. 7, as shown in fig. 8, the connection information obtaining module 601 further includes:
an information storage unit 6013, configured to store the device connection information received by the first information acquiring unit 6011 in the device information database.
Optionally, on the basis of the network device inspection apparatus shown in fig. 6, as shown in fig. 9, the inspection scheme obtaining module 603 includes:
a second judging unit 6031, configured to judge whether the current polling is the first polling for the target network device;
a first scheme obtaining unit 6032, configured to, when the second determining unit 6031 determines that the current round inspection is the first round inspection of the target network device, load at least one first round inspection command matching the model of the target network device in the round inspection command pool, determine at least one second round inspection command selected by the user from the loaded at least one first round inspection command, and use a set of the determined at least one second round inspection command as a target round inspection scheme matching the target network device box;
a second scheme obtaining unit 6033, configured to, when the second determining unit 6031 determines that the current round of inspection is not the first round of inspection of the target network device, determine the round of inspection scheme used when the target network device is inspected the last time as the target round of inspection of the target network device at the current time.
In the embodiment of the present invention, the second determination unit 6031 may be configured to perform step 301 in the above-described method embodiment, the first scheme acquisition unit 6032 may be configured to perform step 302 and step 303 in the above-described method embodiment, and the second scheme acquisition unit 6033 may be configured to perform step 304 in the above-described method embodiment.
Optionally, on the basis of the network equipment inspection apparatus shown in fig. 6, as shown in fig. 10, the network equipment inspection apparatus further includes:
a historical polling data obtaining module 607, configured to obtain each piece of second operation state information extracted when the target network device is polled last time;
and an inspection report generating module 608, configured to compare the first operation state information extracted by the inspection result extracting module 605 with the second operation state information acquired by the historical inspection data acquiring module 607, so as to generate an inspection report.
It should be noted that, because the contents of information interaction, execution process, and the like between the units in the apparatus are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The embodiment of the invention also provides a readable medium, which comprises an execution instruction, and when a processor of the storage controller executes the execution instruction, the storage controller executes the network device inspection method provided by the above embodiments.
An embodiment of the present invention further provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing an execution instruction, the processor is connected with the memory through the bus, and when the memory controller runs, the processor executes the execution instruction stored in the memory, so that the memory controller executes the network device inspection method provided by the above embodiments.
In summary, the method and the device for polling network devices provided by the embodiments of the present invention at least have the following advantages:
1. in the embodiment of the invention, when a target network device needs to be inspected, firstly, device connection information used for being connected to the target network device is obtained, then, network connection with the target network device is established according to the obtained device connection information, then, a target inspection scheme matched with the target network device is obtained, each inspection command included in the target inspection scheme is executed in sequence, at least one inspection result character string is obtained, then, first operation state information used for representing the operation state of the target network device is extracted from each inspection result character string, and the extracted first operation state information is stored in a device information database. Therefore, the equipment connection information of the network equipment is stored in advance and the routing inspection scheme is configured, when the network equipment needs to be routed, the network equipment can be automatically connected to the network equipment according to the equipment connection information, routing inspection commands included in the routing inspection scheme matched with the network equipment are automatically executed, the running state information representing the network equipment is obtained, the obtained running state information is stored in the equipment information database, network operation and maintenance personnel only need to read routing inspection results from the equipment information database, the network operation and maintenance personnel do not need to manually log in the equipment, execute the commands and judge and analyze running parameters, the time for routing inspection of the network equipment is shortened, and therefore the routing inspection efficiency of the network equipment can be improved.
2. In the embodiment of the invention, for the network equipment which has successfully established the network connection before, the equipment connection information of the network equipment is stored in the equipment information database, when the network equipment needs to be inspected again, the network connection with the network equipment can be automatically established only by reading the equipment connection information of the network equipment from the equipment information database, and the network operation and maintenance personnel do not need to input the equipment connection information again, so that the working intensity of the operation and maintenance personnel in the process of inspecting the network equipment can be reduced, and the efficiency of inspecting the network equipment can be further improved.
3. In the embodiment of the invention, aiming at any network equipment, after the network connection with the network equipment is established for the first time for inspection, the equipment connection information of the network equipment is stored in the equipment information database, and when the network equipment is inspected again subsequently, the equipment connection information of the network equipment can be directly read from the equipment information database to establish the network connection, so that the network operation and maintenance personnel do not need to input the equipment connection information every time, the time for the network operation and maintenance personnel to input the equipment connection information is saved, and the efficiency of inspecting the network equipment can be improved.
4. In the embodiment of the invention, for the network equipment which is subjected to one or more times of polling, because the user configures the polling scheme for polling the network equipment before, when the network equipment is polled again, the network equipment can be polled directly according to the polling scheme configured by the user before, and a network operation and maintenance worker does not need to reconfigure the polling scheme when the network equipment is polled every time, so that the time for configuring the polling scheme in the polling process of the network equipment can be saved, and the polling efficiency of the network equipment is improved.
5. In the embodiment of the invention, after the first running state information serving as the current inspection result is obtained, the second running state information serving as the inspection result when the target network equipment is inspected last time is read from the equipment information database, and then the first running state information and the second running state information are stored in the table for comparison, so that the inspection report is obtained. The network operation and maintenance personnel can determine the current operation state of the network equipment through the inspection report and also can determine the operation state change condition of the network equipment, and the network operation and maintenance personnel do not need to analyze and compare inspection results manually, so that the work efficiency of the network operation and maintenance personnel is improved.
6. In the embodiment of the invention, the inspection scheme management capability is more flexible, network equipment of different brands and models does not depend on independent script writing, the universal modules are uniformly connected, internal commands are configured by operators, and the inspection content is more flexible. The Openstack is independent of the core function component of Openstack, and can be decoupled and used independently; the system is supported by a front-end page, so that the system is more friendly to operators unfamiliar with equipment and operation and maintenance. The integrated fully-distributed implementation architecture has no performance bottleneck point, and has good expansibility and robustness.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A network equipment inspection method is characterized by comprising the following steps:
acquiring equipment connection information of target network equipment, wherein the target network equipment is network equipment to be inspected, and the equipment connection information is used for connecting to the target network equipment;
establishing network connection with the target network equipment according to the equipment connection information;
acquiring a target inspection scheme matched with the target network equipment, wherein the target inspection scheme comprises at least one inspection command, and the inspection command is used for acquiring running state information of the target network equipment;
sequentially executing the at least one inspection command included in the target inspection scheme to obtain at least one inspection result character string, wherein the inspection result character string includes the running state information of the target network equipment;
aiming at each inspection result character string, extracting first running state information from the inspection result character string;
and storing each extracted first operation state information into an equipment information database.
2. The method of claim 1, wherein the obtaining device connection information of the target network device comprises:
judging whether network connection is established with the target network equipment or not;
if the network connection with the target network equipment is not established before, sending an information input request to a user, and receiving the equipment connection information input by the user according to the information input request;
and if network connection with the target network equipment is established before, acquiring the equipment connection information of the target network equipment from the equipment information database.
3. The method of claim 2, further comprising, after the receiving the device connection information input by the user according to the information input request:
and storing the received equipment connection information into the equipment information database.
4. The method of claim 1, wherein obtaining the target routing inspection solution that matches the target network device comprises:
judging whether the current polling is the first polling of the target network equipment or not;
if the current inspection is to inspect the target network equipment for the first time, loading at least one first inspection command matched with the model of the target network equipment in an inspection command pool, determining at least one second inspection command selected by a user from the loaded at least one first inspection command, and taking the set of the determined at least one second inspection command as the target inspection scheme matched with the target network equipment box;
and if the current polling is not the first polling of the target network equipment, determining a polling scheme used when the target network equipment is polled last time as the target polling scheme for polling the target network equipment at the current time.
5. The method according to any one of claims 1 to 4, wherein after storing each of the extracted first operating state information in an equipment information database, the method further comprises:
acquiring each second running state information extracted when the target network equipment is patrolled last time;
and comparing each piece of first operation state information extracted in the current inspection with each piece of acquired second operation state information to generate an inspection report.
6. The utility model provides a network equipment inspection device which characterized in that includes:
the system comprises a connection information acquisition module, a connection information acquisition module and a connection information acquisition module, wherein the connection information acquisition module is used for acquiring the equipment connection information of target network equipment, the target network equipment is to-be-inspected network equipment, and the equipment connection information is used for connecting to the target network equipment;
the device connection module is used for establishing network connection with the target network device according to the device connection information acquired by the connection information acquisition module;
the system comprises a routing inspection scheme acquisition module, a routing inspection scheme acquisition module and a routing inspection module, wherein the routing inspection scheme acquisition module is used for acquiring a target routing inspection scheme matched with target network equipment, the target routing inspection scheme comprises at least one routing inspection command, and the routing inspection command is used for acquiring running state information of the target network equipment;
the equipment inspection module is used for sequentially executing the at least one inspection command included in the target inspection scheme acquired by the inspection scheme acquisition module after the equipment connection module establishes network connection with the target network equipment, and acquiring at least one inspection result character string, wherein the inspection result character string includes running state information of the target network equipment;
the equipment inspection module is used for acquiring inspection result character strings of equipment;
and the inspection result storage module is used for storing the first running state information extracted by the inspection result extraction module into an equipment information database.
7. The apparatus of claim 6, wherein the connection information obtaining module comprises:
a first judging unit, configured to judge whether a network connection is established with the target network device before;
a first information obtaining unit, configured to send an information input request to a user and receive the device connection information input by the user according to the information input request when the first determining unit determines that a network connection with the target network device has not been established before;
a second information obtaining unit, configured to obtain the device connection information of the target network device from the device information database when the first determining unit determines that a network connection has been established with the target network device before.
8. The apparatus of claim 7, wherein the connection information obtaining module further comprises:
an information storage unit, configured to store the device connection information received by the first information acquisition unit in the device information database.
9. The apparatus of claim 6, wherein the inspection plan acquisition module comprises:
the second judging unit is used for judging whether the current polling is the first polling on the target network equipment or not;
a first scheme obtaining unit, configured to, when the second determining unit determines that the current round inspection is the first round inspection of the target network device, load at least one first round inspection command matching the model of the target network device in a round inspection command pool, determine at least one second round inspection command selected by a user from the loaded at least one first round inspection command, and use a set of the determined at least one second round inspection command as the target round inspection scheme matching the target network device box;
and the second scheme acquisition unit is used for determining the routing inspection scheme used when the target network equipment is last routed as the target routing inspection scheme for routing inspection of the target network equipment at the current time when the second judgment unit determines that the current routing inspection is not the first routing inspection of the target network equipment.
10. The apparatus of any of claims 6 to 9, further comprising:
the historical inspection data acquisition module is used for acquiring each second running state information extracted when the target network equipment is inspected last time;
and the inspection report generating module is used for comparing the first running state information extracted by the inspection result extracting module with the second running state information acquired by the historical inspection data acquiring module to generate an inspection report.
CN201910961413.9A 2019-10-11 2019-10-11 Network equipment inspection method and device Active CN110691009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910961413.9A CN110691009B (en) 2019-10-11 2019-10-11 Network equipment inspection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910961413.9A CN110691009B (en) 2019-10-11 2019-10-11 Network equipment inspection method and device

Publications (2)

Publication Number Publication Date
CN110691009A true CN110691009A (en) 2020-01-14
CN110691009B CN110691009B (en) 2021-07-06

Family

ID=69111915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910961413.9A Active CN110691009B (en) 2019-10-11 2019-10-11 Network equipment inspection method and device

Country Status (1)

Country Link
CN (1) CN110691009B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111541575A (en) * 2020-04-30 2020-08-14 重庆富民银行股份有限公司 Automatic inspection method and system for closed-source network equipment
CN112000539A (en) * 2020-07-17 2020-11-27 新华三大数据技术有限公司 Inspection method and device
CN112787895A (en) * 2021-03-05 2021-05-11 上海中通吉网络技术有限公司 Network inspection method, device and equipment
CN113328897A (en) * 2021-07-08 2021-08-31 安天科技集团股份有限公司 Method, device, equipment and medium for acquiring running state of network equipment
WO2023103627A1 (en) * 2021-12-06 2023-06-15 中兴通讯股份有限公司 Network inspection method and apparatus, electronic device and storage medium
WO2023116225A1 (en) * 2021-12-21 2023-06-29 华为技术有限公司 Network inspection method, network device and network management device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799791A (en) * 2010-02-08 2010-08-11 成都市华为赛门铁克科技有限公司 Equipment routing inspection method and device
CN103095475A (en) * 2011-10-31 2013-05-08 中兴通讯股份有限公司 Routing Inspection method and system of multimode communication equipment
CN106776185A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Computer equipment hardware method for inspecting and device
CN108959037A (en) * 2018-07-13 2018-12-07 山东汇贸电子口岸有限公司 A kind of data center's automatic detecting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799791A (en) * 2010-02-08 2010-08-11 成都市华为赛门铁克科技有限公司 Equipment routing inspection method and device
CN103095475A (en) * 2011-10-31 2013-05-08 中兴通讯股份有限公司 Routing Inspection method and system of multimode communication equipment
CN106776185A (en) * 2016-12-26 2017-05-31 中国建设银行股份有限公司 Computer equipment hardware method for inspecting and device
CN108959037A (en) * 2018-07-13 2018-12-07 山东汇贸电子口岸有限公司 A kind of data center's automatic detecting method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111541575A (en) * 2020-04-30 2020-08-14 重庆富民银行股份有限公司 Automatic inspection method and system for closed-source network equipment
CN112000539A (en) * 2020-07-17 2020-11-27 新华三大数据技术有限公司 Inspection method and device
CN112787895A (en) * 2021-03-05 2021-05-11 上海中通吉网络技术有限公司 Network inspection method, device and equipment
CN113328897A (en) * 2021-07-08 2021-08-31 安天科技集团股份有限公司 Method, device, equipment and medium for acquiring running state of network equipment
CN113328897B (en) * 2021-07-08 2022-08-23 安天科技集团股份有限公司 Method, device, equipment and medium for acquiring running state of network equipment
WO2023103627A1 (en) * 2021-12-06 2023-06-15 中兴通讯股份有限公司 Network inspection method and apparatus, electronic device and storage medium
WO2023116225A1 (en) * 2021-12-21 2023-06-29 华为技术有限公司 Network inspection method, network device and network management device

Also Published As

Publication number Publication date
CN110691009B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN110691009B (en) Network equipment inspection method and device
CN109361562B (en) Automatic testing method based on associated network equipment access
CN110765026B (en) Automatic test method, device, storage medium and equipment
CN107807877B (en) Code performance testing method and device
CN110750396B (en) Server operating system compatibility testing method and device and storage medium
CN102684927A (en) Method and device for inspecting network device
CN113504932B (en) Firmware data updating method and device
CN110188049A (en) Container Management method, apparatus and electronic equipment
CN112311574A (en) Method, device and equipment for checking network topology connection
CN112269697B (en) Equipment storage performance testing method, system and related device
CN113518019A (en) System identification method based on survival port
CN112395195A (en) Method, device and equipment for processing automatic test data and storage medium
CN106612213B (en) Equipment testing method and device
CN110880990A (en) Configuration checking method and device for big data cluster component and computing equipment
CN115130112A (en) Quick start-stop method, device, equipment and storage medium
CN115373916A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and computer-readable storage medium
CN107241218A (en) A kind of fault detection method and device
CN114510381A (en) Fault injection method, device, equipment and storage medium
CN109560964B (en) Equipment compliance checking method and device
CN114064510A (en) Function testing method and device, electronic equipment and storage medium
CN112667512A (en) Data drive test method, device, equipment and computer readable storage medium
CN115150254B (en) PCIe link fault detection method, detection device, equipment and medium
CN112333048B (en) Method and device for detecting connectivity of opened service online user
CN111597101A (en) SDK access state detection method, computer device and computer readable storage medium
CN111124885B (en) White board switch testing method and device

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
CB02 Change of applicant information

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Inspur cloud Information Technology Co., Ltd

Address before: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant before: Tidal Cloud Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant