CN114500246B - Network connection state monitoring method and device, computer equipment and storage medium - Google Patents

Network connection state monitoring method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114500246B
CN114500246B CN202210138698.8A CN202210138698A CN114500246B CN 114500246 B CN114500246 B CN 114500246B CN 202210138698 A CN202210138698 A CN 202210138698A CN 114500246 B CN114500246 B CN 114500246B
Authority
CN
China
Prior art keywords
container
label
name
monitoring
catalog
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.)
Active
Application number
CN202210138698.8A
Other languages
Chinese (zh)
Other versions
CN114500246A (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.)
Ping An Securities Co Ltd
Original Assignee
Ping An Securities 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 Ping An Securities Co Ltd filed Critical Ping An Securities Co Ltd
Priority to CN202210138698.8A priority Critical patent/CN114500246B/en
Publication of CN114500246A publication Critical patent/CN114500246A/en
Application granted granted Critical
Publication of CN114500246B publication Critical patent/CN114500246B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to the technical field of artificial intelligence and discloses a network connection state monitoring method, a device, computer equipment and a storage medium, wherein the method is implemented by acquiring a state information list corresponding to each monitoring node in a cluster to be monitored; determining a target process catalog from a preset catalog storage area, and performing regular judgment on the target process catalog to determine a container process catalog from all the target process catalog; a container process catalog corresponds to a process label; determining a container name, a space name and a combined name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combined name corresponding to the process label; and collecting state monitoring data from the cluster to be monitored according to the data collection label, and determining the network connection state of the cluster to be monitored according to the state monitoring data. The application improves the efficiency and accuracy of network connection state monitoring.

Description

Network connection state monitoring method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of network monitoring technologies, and in particular, to a method and apparatus for monitoring a network connection state, a computer device, and a storage medium.
Background
The network connection state is important data for health monitoring and investigation of the system and the application, and the fault location of the system and the application can be rapidly carried out by collecting the data of the network connection state, so that the fault recovery speed of the system is improved.
When fault localization is performed for applications or systems in some clusters, data of network connection state is lacking. In the prior art, a query command is often required to be created, and then the query command is executed in a designated container to perform data query, so that the method cannot directly perform fault location through data in a network connection state, and the execution efficiency is low, so that the fault recovery efficiency of a system is low.
Disclosure of Invention
The embodiment of the application provides a network connection state monitoring method, a device, computer equipment and a storage medium, which are used for solving the problem of low fault recovery efficiency caused by low execution efficiency of network connection state fault location in the prior art.
A network connection status monitoring method, comprising:
receiving a monitoring instruction of a cluster to be monitored; the cluster to be monitored comprises at least one monitoring node;
acquiring a state information list corresponding to each monitoring node; wherein one of the monitoring nodes corresponds to one of the state information lists;
determining a target process catalog from a preset catalog storage area, and performing regular judgment on the target process catalog to determine a container process catalog from all target process catalogs; one of the container process directories corresponds to one process tag;
determining a container name, a space name and a combined name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combined name corresponding to the process label;
and collecting state monitoring data from the cluster to be monitored according to the data collection label, and determining the network connection state of the cluster to be monitored according to the state monitoring data.
A network connection status monitoring apparatus comprising:
the monitoring instruction receiving module is used for receiving the monitoring instruction of the cluster to be monitored; the cluster to be monitored comprises at least one monitoring node;
the state information list acquisition module is used for acquiring a state information list corresponding to each monitoring node; wherein one of the monitoring nodes corresponds to one of the state information lists;
the process catalog screening module is used for determining a target process catalog from a preset catalog storage area and carrying out regular judgment on the target process catalog so as to determine a container process catalog from all the target process catalogs; one of the container process directories corresponds to one process tag;
the data acquisition label generation module is used for determining a container name, a space name and a combination name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combination name corresponding to the same process label;
and the network connection state monitoring module is used for acquiring state monitoring data from the cluster to be monitored according to the data acquisition tag and determining the network connection state of the cluster to be monitored according to the state monitoring data.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above network connection status monitoring method when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the network connection status monitoring method described above.
The network connection state monitoring method, the network connection state monitoring device, the computer equipment and the storage medium are characterized in that the method receives a monitoring instruction of a cluster to be monitored; the cluster to be monitored comprises at least one monitoring node; acquiring a state information list corresponding to the monitoring node; wherein one of the monitoring nodes corresponds to one of the state information lists; determining a target process catalog from a preset catalog storage area, and performing regular judgment on the target process catalog to determine a container process catalog from all target process catalogs; one of the container process directories corresponds to one process tag; determining a container name, a space name and a combined name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combined name corresponding to the process label; and collecting state monitoring data from the to-be-monitored cluster according to the data collection labels corresponding to the process labels, and determining the network connection state of the to-be-monitored cluster according to the state monitoring data.
According to the application, only one preset data acquisition end is arranged in each monitoring node, so that one monitoring node only corresponds to one state information list, and further, the network information files of each process label such as the container name, the space name and the combination name can be determined through the state information list, so that the corresponding data acquisition label is generated according to the network information files, and further, the state monitoring data can be acquired according to the data acquisition label, thereby achieving the purpose of directly acquiring the state monitoring data to monitor the network connection state of the cluster to be monitored, and improving the efficiency and the accuracy of network connection state monitoring.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of a network connection status monitoring method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for monitoring network connection status according to an embodiment of the present application;
FIG. 3 is a schematic block diagram of a network connection status monitoring apparatus according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a computer device in accordance with an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The network connection state monitoring method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Specifically, the network connection state monitoring method is applied to a network connection state monitoring system, and the network connection state monitoring system comprises a client and a server as shown in fig. 1, wherein the client and the server communicate through a network, so that the problem of low fault recovery efficiency caused by low fault location execution efficiency of the network connection state in the prior art is solved. The client is also called a client, and refers to a program corresponding to the server for providing local service for the client. The client may be installed on, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
In one embodiment, as shown in fig. 2, a network connection status monitoring method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s10: receiving a monitoring instruction of a cluster to be monitored; the cluster to be monitored comprises at least one monitoring node.
It can be appreciated that the cluster to be monitored Kubernetes cluster proposed in this embodiment has a plurality of monitoring nodes in the cluster to be monitored. Wherein the monitoring nodes may be nodes arranged in different applications in the cluster to be monitored.
S20: acquiring a state information list corresponding to each monitoring node; wherein one of the monitoring nodes corresponds to one of the status information lists.
It can be understood that, in this embodiment, the host directory mount of the monitoring node is first deployed by means of kubernetes daemonset resources, and mapped into the preset directory storage area, so that each monitoring node has only one preset data acquisition end, that is, it is characterized that one monitoring node can only acquire one state information list through the corresponding preset data acquisition end. The state information list refers to a pod information list, and the state information list includes at least one process tag network information file, where the network information file includes a container name corresponding to the process tag, a container tag corresponding to the container name, a space name, and other data.
Specifically, in the above description, it is pointed out that there is only one preset data acquisition end for one monitoring node, and further data acquisition can be performed through the preset data acquisition end, so that a pod information list corresponding to the monitoring node is screened out through screening the acquired data, namely, a state information list.
S30: determining a target process catalog from a preset catalog storage area, and performing regular judgment on the target process catalog to determine a container process catalog from all target process catalogs; one of the container process directories corresponds to one process tag.
It will be appreciated that in the above description, it is pointed out that the host directory mount of the monitoring node is mapped into the preset directory storage area, and the preset directory storage area includes the host directory of the monitoring node. There are several directories in the preset directory storage area, and then all the directories in the preset directory storage area need to be traversed, and the target process directory is screened out according to the directory names of the directories. The target process directory is a directory that may contain a process tag.
Further, in this embodiment, the purpose of performing regular judgment on the target process directory is to determine whether the target process directory represents a container process, and then, by setting a preset regular expression, and matching fields in the target process directory with fields of the regular expression, the container process directory is screened out from all the target process directories. Wherein, a container process catalog corresponds to a process label, and the process label can be determined according to the catalog name of the container process catalog.
S40: and determining a container name, a space name and a combined name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combined name corresponding to the process label.
Specifically, in the above description, the state information list includes a container name, a container label corresponding to the container name, a space name and other data, and then, after the target process directory is regularly judged to determine the container process directory from all the target process directories, the container label can be extracted from the container process directory, and then, the container label is matched with a field in the state information list, so as to determine the container name corresponding to the container process directory, and then, the process label corresponding to the container process directory is associated with the container name, and then, the state information list can be periodically acquired and analyzed in a set acquisition period, and then, information such as a space name or a combined name corresponding to the process label can be acquired from the state information list, and further, a data acquisition label corresponding to the process label is generated according to the container name, the space name and the combined name corresponding to the same process label.
S50: and collecting state monitoring data from the cluster to be monitored according to the data collection label, and determining the network connection state of the cluster to be monitored according to the state monitoring data.
It may be understood that, in the foregoing description, the deployment is indicated by way of kubernetes daemonset resources, and the host directory mount of the monitoring node is mapped to the preset directory storage area, so that each monitoring node has and has only one preset data acquisition end, and simultaneously kubernetes daemonset resources are exposed as servers in the to-be-monitored cluster, and corresponding server monitor resources are created, further, in the state information list, the container name, the space name and the combined name corresponding to the process label are determined, and after the data acquisition label corresponding to the process label is generated according to the container name, the space name and the combined name corresponding to the same process label, the state monitoring data corresponding to each process label is acquired from the to-be-monitored cluster by a collector in the data acquisition program according to the process label, so that the network connection state of the to-be-monitored cluster is determined according to the acquired state monitoring data.
In this embodiment, only one preset data acquisition end is disposed in each monitoring node, so that one monitoring node corresponds to only one state information list, and further, network information files of each process label, such as the container name, the space name, the combination name and the like, can be determined through the state information list, so that corresponding data acquisition labels are generated according to the network information files, and further, state monitoring data can be acquired according to the data acquisition labels, thereby achieving the purpose of directly acquiring the state monitoring data to monitor the network connection state of the cluster to be monitored, and improving the efficiency and the accuracy of network connection state monitoring.
In an embodiment, before step S20, that is, before the obtaining the status information list corresponding to each monitoring node, the method further includes:
and carrying out process data acquisition on the management interfaces of the cluster to be monitored through a preset data acquisition end to obtain interface acquisition data.
It can be understood that, in the above description, it is indicated that one monitoring node has only one preset data collection end, so that the preset data collection end of each monitoring node can perform process data collection on the management interface of the cluster to be monitored, but all the collected interface collection data do not necessarily correspond to the monitoring node corresponding to the preset data collection end, so that the interface collection data need to be screened. The management interface in the cluster to be monitored is an interface server in the cluster to be monitored, and process data (such as a process label, operation data corresponding to the process label, etc.) of each interface object (such as the above-mentioned monitoring node) in the cluster to be monitored is stored in the interface server.
Acquiring a host name label corresponding to each monitoring node; wherein one of the monitoring nodes is associated with a hostname tag.
It can be understood that each monitoring node has a host name label, that is, each monitoring node belongs to a unique host, and the host name label is a unique identifier of the monitoring node.
And screening out node process data corresponding to each monitoring node from the interface collected data according to the host name label, and generating a state information list according to the node process data corresponding to each monitoring node.
Specifically, after the host name labels corresponding to the monitoring nodes are obtained, the interface collected data can be screened according to the host name labels corresponding to the monitoring nodes, and then the node process data corresponding to the monitoring nodes are screened from the interface collected data, so that a state information list is generated according to the node process data corresponding to the monitoring nodes in the interface collected data.
Further, in the running process of the application program in the cluster to be monitored, real-time data acquisition can be performed on the management interface of the cluster to be monitored through the preset data acquisition end, so that the acquired interface acquisition data can be updated continuously, errors caused by the interface acquisition data to the network connection state of the subsequent cluster to be monitored when the network connection state is disconnected only at a certain moment can be avoided, and the accuracy of judging the network connection state of the cluster to be monitored is improved.
In one embodiment, in step S30, that is, determining the target process directory from the preset directory storage area includes:
acquiring all catalogues to be screened from the preset catalog storage area; one of the directories to be screened corresponds to one directory name.
It can be understood that, in the foregoing description, the preset directory storage area includes a host directory of each monitoring node, where the host directory is a directory to be screened, and one directory to be screened has a directory name, and after the directory name of the directory to be screened is identified, a field in a directory name position is extracted to obtain a directory name corresponding to each directory to be screened.
Traversing each catalog to be screened to determine whether the catalog names of the catalog to be screened accord with a preset catalog name format.
Specifically, after all the directories to be screened are obtained from the preset directory storage area, the directory name traversal can be performed on all the directories to be screened, so as to determine whether the directory names of the directories to be screened accord with the preset directory name format. It can be understood that, the preset directory name format in this embodiment refers to an integer digital format, that is, after obtaining the directory name of the directory to be screened, determining whether the directory name of each directory to be screened is an integer digital format, and if the format of the directory name of the directory to be screened is an integer digital format, recording the directory to be screened as a target process directory; if the format of the directory name of the directory to be screened is not the integer digital format, the directory to be screened is characterized as not being the target process directory.
And recording the directory to be screened corresponding to the directory name conforming to the preset directory name format as the target process directory.
Specifically, after traversing each to-be-screened directory to determine whether the directory name of the to-be-screened directory accords with a preset directory name format, recording the to-be-screened directory corresponding to the directory name which accords with the preset directory name format as a target process directory.
In one embodiment, in step S30, that is, the performing a regular determination on the target process directory to determine a container process directory from all target process directories includes:
and acquiring target process files in each target process catalog, and carrying out file analysis on the target process files to acquire target process fields in the target process files.
It can be understood that a corresponding target process file exists in each target process directory, the target process file is a cmdline file in the target process directory, and further after the target process file in the target process directory is obtained, the target process file can be subjected to file analysis, so that fields of the analyzed target process file are extracted, and the fields are target process fields.
And acquiring a preset sample regular field, and matching each target process field with the preset sample regular field.
Illustratively, the sample canonical field may be, for example, "connected-shim-nano-space moby-workbench/var/lib/connected/io
-address "; the preset sample regular field can be adjusted according to different clusters to be monitored. Specifically, after the target process file is subjected to file analysis to obtain target process fields in the target process file, a preset sample regular field is obtained, and then each target process field is matched with the preset sample regular field.
And recording a target process directory corresponding to the target process field matched with the preset sample regular field as the container process directory.
Specifically, after each target process field is matched with the preset sample regular field, if the target process field is successfully matched with the preset sample regular field, the target process directory corresponding to the target process field matched with the preset sample regular field is recorded as a container process directory.
In an embodiment, after the recording, as the container process directory, the target process directory corresponding to the target process field matched with the preset sample regular field, the method further includes:
and carrying out character recognition on the target process field of the container process catalog to determine whether the target process field contains target characters.
It is understood that the target characters in this implementation refer to bracket characters. Specifically, after the target process directory corresponding to the target process field matched with the preset sample regular field is recorded as the container process directory, character recognition is performed on the target process field of the container process directory, so that whether the target process field contains target characters or not is determined, that is, whether the target process field contains bracket characters or not is determined.
And detecting target position information of the target character in the target process field when the target character is contained in the target process field.
Specifically, after character recognition is performed on a target process field of the container process directory to determine whether the target process field contains a target character, if the target process field contains the target character, detecting target position information of the target character in the target process field. It will be appreciated that the target character is indicated as a bracket character in the above description, and therefore it is necessary to determine the position information of the left bracket character and the position information of the right bracket character in the bracket characters from the target process field.
Further, if the target process field does not contain the target character, the target process field is sent to a preset receiver, so that the preset receiver determines the container label from the target process field and returns the container label. The preset receiver can be the sender of the monitoring instruction.
And extracting the field of the target process according to the target position information, and recording the extracted field as a container label corresponding to the container process catalog.
Specifically, after detecting the target position information of the target character in the target process field, extracting a field between the position information of the left bracket character and the position information of the right bracket character from the target process field according to the target position information, namely, the position information of the left bracket character and the position information of the right bracket character, and recording the extracted field as a container label corresponding to the container process catalog.
In one embodiment, in step S40, that is, the determining the container name corresponding to the process label from the state information list includes:
acquiring all list tags in the state information list; one of the status information lists includes at least one list tag, and one list tag corresponds to one list name.
It should be understood that, in the above description, the state information list refers to a pod information list, and the state information list includes a network information file of at least one process tag, where the network information file includes a container name corresponding to the process tag, a container tag corresponding to the container name, a space name, and other data, so that the list tag referred to in this embodiment is a container tag in the state information list, and the list name is a name of a container corresponding to each list tag.
Obtaining a container label corresponding to the container process catalog, and matching the container label with each list label; one of the list tags is associated with a list name.
Specifically, in the step, field extraction is performed on the target process field according to the target position information, and the extracted field is recorded as a container label corresponding to the container process catalog, that is, it is indicated that one container process catalog corresponds to one container label, and then the container label corresponding to the container process catalog can be matched with each list label, so that the list label corresponding to the container label can be queried in the state information list.
And when the list label matched with the container label exists, recording a list name corresponding to the list label matched with the container label as the container name.
Specifically, after matching the container label with each of the list labels, if there is a list label matching the container label, the list name corresponding to the list label matching the container label is recorded as the container name. It will be understood that in the above description, it is pointed out that one container process directory corresponds to one container tag, and one container process directory corresponds to one process tag, so that the container name corresponds to the process tag, and in addition, a network information file of at least one process tag is included in the state information list, and the network information file includes data such as the container name corresponding to the process tag, the container tag corresponding to the container name, the space name, and so on, so that after determining the container name corresponding to the process tag, the space name corresponding to the container name, and the combination name corresponding to the process tag can be determined from the state information list.
In an embodiment, after the matching the container label with each of the list labels, the method further includes:
and when the container label is not matched with all the list labels, generating a matching failure instruction containing the container label, and sending the matching failure instruction to a preset receiver.
Specifically, after the container label is matched with each list label, if the container label is not matched with all list labels, because the container label corresponds to the container process catalog, when the target process catalog is the container process catalog, the corresponding list label matched with the container label must necessarily exist in the state information list, if the target process catalog does not exist, the target process catalog corresponding to the container label may be misjudged as the container process catalog, or the container label is extracted incorrectly, so that a matching failure instruction containing the container label is generated, and the matching failure instruction is sent to a preset receiver, so that the preset receiver determines the accuracy of the container label.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
In an embodiment, a network connection state monitoring apparatus is provided, where the network connection state monitoring apparatus corresponds to the network connection state monitoring method in the above embodiment one by one. As shown in fig. 3, the network connection status monitoring apparatus includes a monitoring instruction receiving module 10, a status information list obtaining module 20, a process catalog filtering module 30, a data acquisition tag generating module 40, and a network connection status monitoring module 50. The functional modules are described in detail as follows:
the monitoring instruction receiving module 10 is used for receiving a monitoring instruction of a cluster to be monitored; the cluster to be monitored comprises at least one monitoring node;
a status information list obtaining module 20, configured to obtain a status information list corresponding to each of the monitoring nodes; wherein one of the monitoring nodes corresponds to one of the state information lists;
the process catalog screening module 30 is configured to determine a target process catalog from a preset catalog storage area, and perform regular judgment on the target process catalog to determine a container process catalog from all target process catalogs; one of the container process directories corresponds to one process tag;
a data acquisition tag generating module 40, configured to determine a container name, a space name, and a combined name corresponding to the process tag from the state information list, and generate a data acquisition tag corresponding to the process tag according to the container name, the space name, and the combined name corresponding to the process tag;
the network connection state monitoring module 50 is configured to collect state monitoring data from the to-be-monitored cluster according to the data collection tag, and determine a network connection state of the to-be-monitored cluster according to the state monitoring data.
Preferably, the network connection state monitoring apparatus further includes:
the data acquisition module is used for acquiring data of the management interfaces of the cluster to be monitored through a preset data acquisition end to obtain interface acquisition data;
the host name label acquisition module is used for acquiring the host name label corresponding to each monitoring node; wherein one of the monitoring nodes is associated with a hostname tag;
and the data matching module is used for screening a state information list corresponding to each monitoring node from the interface collected data according to each host name label.
Preferably, the process catalog filtering module 30 includes:
the catalog to be screened obtaining unit is used for obtaining all the catalogs to be screened from the preset catalog storage area; one of the directories to be screened corresponds to one directory name;
the catalog traversing unit is used for traversing each catalog to be screened so as to determine whether the catalog names of the catalog to be screened accord with a preset catalog name format;
and the target process directory determining unit is used for recording the directory to be screened corresponding to the directory name conforming to the preset directory name format as the target process directory.
Preferably, the process catalog screening module 30 further comprises:
the file analysis unit is used for acquiring target process files in each target process catalog and carrying out file analysis on the target process files so as to acquire target process fields in the target process files;
the field matching unit is used for acquiring a preset sample regular field and matching each target process field with the preset sample regular field;
and the container process catalog determining unit is used for recording a target process catalog corresponding to the target process field matched with the preset sample regular field as the container process catalog.
Preferably, the network connection state monitoring apparatus further includes:
the character recognition module is used for carrying out character recognition on a target process field of the container process catalog so as to determine whether the target process field contains a target character or not;
the position information detection module is used for detecting target position information of the target character in the target process field when the target character is contained in the target process field;
and the field extraction module is used for extracting the field of the target process according to the target position information and recording the extracted field as a container label corresponding to the container process catalog.
Preferably, the data acquisition tag generation module 40 includes:
a list tag obtaining unit, configured to obtain all list tags in the state information list; one of the state information lists comprises at least one list label, and one list label corresponds to one list name;
the container label matching unit is used for acquiring container labels corresponding to the container process catalogue and matching the container labels with the list labels; one of the list tags is associated with a list name;
and the container name determining unit is used for recording the list name corresponding to the list label matched with the container label as the container name when the list label matched with the container label exists.
Preferably, the data acquisition tag generation module 40 further comprises:
and the matching failure instruction sending unit is used for generating a matching failure instruction containing the container label when the container label is not matched with all the list labels, and sending the matching failure instruction to a preset receiver.
The specific limitation of the network connection state monitoring device may be referred to the limitation of the network connection state monitoring method hereinabove, and will not be described herein. The modules in the network connection state monitoring device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data used in the network connection state monitoring method in the above embodiment. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a network connection status monitoring method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the network connection status monitoring method of the above embodiments when executing the computer program.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the network connection status monitoring method in the above embodiments.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for monitoring network connection status, comprising:
receiving a monitoring instruction of a cluster to be monitored; the cluster to be monitored comprises at least one monitoring node;
acquiring a state information list corresponding to the monitoring node; wherein one of the monitoring nodes corresponds to one of the state information lists;
determining a target process catalog from a preset catalog storage area, and performing regular judgment on the target process catalog to determine a container process catalog from all target process catalogs; one of the container process directories corresponds to one process tag;
determining a container name, a space name and a combined name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combined name corresponding to the process label;
and collecting state monitoring data from the cluster to be monitored according to the data collection label, and determining the network connection state of the cluster to be monitored according to the state monitoring data.
2. The network connection status monitoring method according to claim 1, wherein before the obtaining the status information list corresponding to each of the monitoring nodes, further comprising:
performing process data acquisition on the management interfaces of the cluster to be monitored through a preset data acquisition end to obtain interface acquisition data;
acquiring a host name label corresponding to each monitoring node; wherein one of the monitoring nodes is associated with a hostname tag;
and screening out node process data corresponding to each monitoring node from the interface collected data according to the host name label, and generating a state information list according to the node process data corresponding to each monitoring node.
3. The method for monitoring network connection status according to claim 1, wherein determining the target process directory from the preset directory storage area comprises:
acquiring all catalogues to be screened from the preset catalog storage area; one of the directories to be screened corresponds to one directory name;
traversing each catalog to be screened to determine whether the catalog names of the catalog to be screened accord with a preset catalog name format;
and recording the directory to be screened corresponding to the directory name conforming to the preset directory name format as the target process directory.
4. The method for monitoring network connection status according to claim 1, wherein the performing regular judgment on the target process directory to determine a container process directory from all target process directories comprises:
acquiring target process files in each target process catalog, and carrying out file analysis on the target process files to acquire target process fields in the target process files;
acquiring a preset sample regular field, and matching each target process field with the preset sample regular field;
and recording a target process directory corresponding to the target process field matched with the preset sample regular field as the container process directory.
5. The method for monitoring network connection state as claimed in claim 4, wherein after recording a target process directory corresponding to a target process field matched with the preset sample regular field as the container process directory, further comprises:
performing character recognition on a target process field of the container process catalog to determine whether the target process field contains a target character;
detecting target position information of a target character in the target process field when the target character is contained in the target process field;
and extracting the field of the target process according to the target position information, and recording the extracted field as a container label corresponding to the container process catalog.
6. The network connection status monitoring method according to claim 1, wherein the determining a container name corresponding to the process tag from the status information list comprises:
acquiring all list tags in the state information list; one of the state information lists comprises at least one list label, and one list label corresponds to one list name;
obtaining a container label corresponding to the container process catalog, and matching the container label with each list label; one of the list tags is associated with a list name;
and when the list label matched with the container label exists, recording a list name corresponding to the list label matched with the container label as the container name.
7. The network connection status monitoring method of claim 6, wherein after said matching said container label with each of said list labels, further comprising:
and when the container label is not matched with all the list labels, generating a matching failure instruction containing the container label, and sending the matching failure instruction to a preset receiver.
8. A network connection status monitoring apparatus, comprising:
the monitoring instruction receiving module is used for receiving the monitoring instruction of the cluster to be monitored; the cluster to be monitored comprises at least one monitoring node;
the state information list acquisition module is used for acquiring a state information list corresponding to each monitoring node; wherein one of the monitoring nodes corresponds to one of the state information lists;
the process catalog screening module is used for determining a target process catalog from a preset catalog storage area and carrying out regular judgment on the target process catalog so as to determine a container process catalog from all the target process catalogs; one of the container process directories corresponds to one process tag;
the data acquisition label generation module is used for determining a container name, a space name and a combination name corresponding to the process label from the state information list, and generating a data acquisition label corresponding to the process label according to the container name, the space name and the combination name corresponding to the process label;
and the network connection state monitoring module is used for acquiring state monitoring data from the cluster to be monitored according to the data acquisition tag and determining the network connection state of the cluster to be monitored according to the state monitoring data.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the network connection status monitoring method according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the network connection status monitoring method according to any one of claims 1 to 7.
CN202210138698.8A 2022-02-15 2022-02-15 Network connection state monitoring method and device, computer equipment and storage medium Active CN114500246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210138698.8A CN114500246B (en) 2022-02-15 2022-02-15 Network connection state monitoring method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210138698.8A CN114500246B (en) 2022-02-15 2022-02-15 Network connection state monitoring method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114500246A CN114500246A (en) 2022-05-13
CN114500246B true CN114500246B (en) 2023-09-01

Family

ID=81480637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210138698.8A Active CN114500246B (en) 2022-02-15 2022-02-15 Network connection state monitoring method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114500246B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130925A (en) * 2019-11-29 2020-05-08 广州文远知行科技有限公司 Resource monitoring method and device, computer equipment and storage medium
CN111277460A (en) * 2020-01-17 2020-06-12 江苏满运软件科技有限公司 ZooKeeper containerization control method and device, storage medium and electronic equipment
WO2020253347A1 (en) * 2019-06-17 2020-12-24 深圳前海微众银行股份有限公司 Container cluster management method, device and system
CN112468361A (en) * 2020-11-19 2021-03-09 苏州浪潮智能科技有限公司 Network connection state monitoring method and device, electronic equipment and storage medium
WO2021051582A1 (en) * 2019-09-17 2021-03-25 平安科技(深圳)有限公司 Host performance monitoring method and apparatus for server cluster, device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020253347A1 (en) * 2019-06-17 2020-12-24 深圳前海微众银行股份有限公司 Container cluster management method, device and system
WO2021051582A1 (en) * 2019-09-17 2021-03-25 平安科技(深圳)有限公司 Host performance monitoring method and apparatus for server cluster, device, and storage medium
CN111130925A (en) * 2019-11-29 2020-05-08 广州文远知行科技有限公司 Resource monitoring method and device, computer equipment and storage medium
CN111277460A (en) * 2020-01-17 2020-06-12 江苏满运软件科技有限公司 ZooKeeper containerization control method and device, storage medium and electronic equipment
CN112468361A (en) * 2020-11-19 2021-03-09 苏州浪潮智能科技有限公司 Network connection state monitoring method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向大规模集群的自动化监控系统;杨杰 等;计算机工程与科学(第10期);全文 *

Also Published As

Publication number Publication date
CN114500246A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN109902073B (en) Log processing method and device, computer equipment and computer readable storage medium
CN111046011A (en) Log collection method, system, node, electronic device and readable storage medium
CN110781028B (en) Data backup method, data recovery method, data backup device, data recovery device and computing equipment
CN111708794B (en) Data comparison method and device based on big data platform and computer equipment
CN112769802B (en) Access verification method and device based on server, electronic equipment and storage medium
CN103455600A (en) Video URL (Uniform Resource Locator) grabbing method and device and server equipment
CN103716384A (en) Method and device for realizing cloud storage data synchronization in cross-data-center manner
CN114143171B (en) Alarm root cause positioning method and system based on TR069 protocol
CN110245059B (en) Data processing method, device and storage medium
CN111367857A (en) Data storage method and device, FTP server and storage medium
CN114500246B (en) Network connection state monitoring method and device, computer equipment and storage medium
CN113553588B (en) Terminal software management method
CN112818204B (en) Service processing method, device, equipment and storage medium
CN105988917B (en) Abnormal information acquisition method and device
CN112527595A (en) Monitoring method and device for Greenplus cluster database and computer equipment
CN110020263B (en) Monitoring method and device of closed system and monitoring equipment
CN114765599A (en) Sub-domain name acquisition method and device
CN105391602A (en) Data acquisition test method and device
CN112035427B (en) Data query method based on Redis and HBase and related equipment
CN112948490B (en) Data synchronization method, device, equipment and storage medium based on kafka and redis
CN114301709B (en) Message processing method and device, storage medium and computing equipment
CN115904870A (en) Method, system, device and medium for processing log data
CN113691423B (en) Drawing method and device of data flow path, storage medium and electronic equipment
CN210804423U (en) Website information acquisition and release platform system
CN116910586A (en) System abnormal breakdown recognition method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant