CN112152824A - Performance index data acquisition method and device - Google Patents

Performance index data acquisition method and device Download PDF

Info

Publication number
CN112152824A
CN112152824A CN201910561066.0A CN201910561066A CN112152824A CN 112152824 A CN112152824 A CN 112152824A CN 201910561066 A CN201910561066 A CN 201910561066A CN 112152824 A CN112152824 A CN 112152824A
Authority
CN
China
Prior art keywords
acquisition
acquired
performance index
performance
index
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
CN201910561066.0A
Other languages
Chinese (zh)
Other versions
CN112152824B (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN201910561066.0A priority Critical patent/CN112152824B/en
Publication of CN112152824A publication Critical patent/CN112152824A/en
Application granted granted Critical
Publication of CN112152824B publication Critical patent/CN112152824B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • 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/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • 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/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • 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

Abstract

The application discloses a performance index data acquisition method and device. The method comprises the following steps: acquiring information of performance indexes to be acquired of network equipment, and determining a first acquisition table corresponding to the performance indexes to be acquired according to a historical acquisition record or a corresponding relation between the performance indexes and object identification; the first acquisition table comprises an object identifier of the performance index to be acquired; and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired to obtain index data of the performance index to be acquired. The performance index data acquisition process of the embodiment of the application does not need manual participation, the labor cost of operation and maintenance is saved, and the error probability is reduced.

Description

Performance index data acquisition method and device
Technical Field
The application relates to the technical field of network management, in particular to a performance index data acquisition method and device.
Background
The Performance index data is basic data of a Key Performance Indicator (KPI) in network management, and through the Performance index data, operation and maintenance personnel can count and observe the safety and the operating condition of network element equipment and the use condition of system resources, and can also position problems to assist in fault processing.
At present, the scale of a telecommunication network is large, various network devices such as switches, routers, firewalls and the like are used, each manufacturer device includes multiple models, the acquisition tables corresponding to different models are different, it is not a simple matter to acquire data of a certain KPI index of the devices and the requirement on professional technology of operation and maintenance personnel is high, for example, the operation and maintenance personnel need to set the index to be acquired and search or remember the used MIB (Management Information Base) OID Identifier (Object Identifier, also called internet of things domain name), and this process is completed manually, and the manual work is easy to make mistakes.
Disclosure of Invention
The application provides a performance index data acquisition method and device, which do not need to manually set acquisition indexes and OID identifiers, save the labor cost of operation and maintenance, and reduce the error probability.
According to one aspect of the application, a performance index data acquisition method is provided, and the method comprises the following steps:
acquiring information of performance indexes to be acquired of network equipment, and determining a first acquisition table corresponding to the performance indexes to be acquired according to a historical acquisition record or a corresponding relation between the performance indexes and object identification; the first acquisition table comprises an object identifier of the performance index to be acquired;
and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired to obtain index data of the performance index to be acquired.
According to another aspect of the present application, there is provided a performance index data acquisition apparatus, comprising:
the acquisition table determining module is used for acquiring information of performance indexes to be acquired of the network equipment and determining a first acquisition table corresponding to the performance indexes to be acquired according to historical acquisition records or the corresponding relation between the performance indexes and the object identification; the first acquisition table comprises an object identifier of the performance index to be acquired;
and the acquisition module is used for calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired to obtain the index data of the performance index to be acquired.
According to yet another aspect of the present application, there is provided an electronic device including: a processor, and a memory storing a computer program operable on the processor;
the processor, when executing the computer program in the memory, performs the steps of the method of one aspect of the application.
According to yet another aspect of the application, a non-transitory computer-readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, performs the steps of the method according to one aspect of the application.
Has the advantages that: by applying the performance index data acquisition scheme of the embodiment of the application, the information of the performance index to be acquired of the network equipment is acquired, the first acquisition table corresponding to the performance index to be acquired is determined according to the historical acquisition record or the corresponding relation between the performance index and the object identifier, and the simple network management protocol SNMP acquisition interface is called based on the object identifier of the performance index to be acquired in the first acquisition table to obtain the index data of the performance index to be acquired. Therefore, the performance index data acquisition process does not need manual participation, the operation and maintenance labor cost is saved, and the error probability is reduced.
Drawings
FIG. 1 is a flow chart of a performance index data collection method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating the determination of a first acquisition table according to one embodiment of the present application;
FIG. 3 is a schematic view of an acquisition flow according to an embodiment of the present application;
FIG. 4 is a block diagram of a performance metric data collection device according to an embodiment of the present application;
FIG. 5 is a block diagram of an electronic device according to an embodiment of the present application;
FIG. 6 is a block diagram of a non-transitory computer readable storage medium of one embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The inventive concept of the embodiment of the application is as follows: in the prior art, index data acquisition needs to manually set a certain index and needs to use which OID to acquire, that is, the corresponding relationship between the acquisition index and the object identifier OID is determined, in practical application, a maintenance worker may not know the OID corresponding to the acquisition index, and at this time, the maintenance worker needs to consult an equipment manufacturer to find the OID corresponding to the acquired index from a lot of information. Therefore, the requirement on the professional technology of operation and maintenance personnel is high, and the index data acquisition efficiency is low due to the fact that manual work easily makes mistakes. In contrast, in the embodiment of the present application, on the basis of accumulating a large number of OID object identifiers corresponding to KPI indicators, a process of searching for an OID object identifier of an acquisition indicator is automatically completed. Compared with a manual setting searching mode, the error probability is much smaller, and the operation and maintenance labor cost is saved.
Fig. 1 is a flowchart of a performance index data acquisition method according to an embodiment of the present application, and referring to fig. 1, the performance index data acquisition method according to the embodiment includes the following steps:
step S101, acquiring information of performance indexes to be acquired of network equipment, and determining a first acquisition table corresponding to the performance indexes to be acquired according to historical acquisition records or corresponding relations between the performance indexes and object identifiers;
the first acquisition table comprises an object identifier of the performance index to be acquired;
step S102, based on the object identification of the performance index to be collected, a Simple Network Management Protocol (SNMP) collection interface is called to obtain index data of the performance index to be collected.
As shown in fig. 1, in the performance index data acquisition method of this embodiment, a first acquisition table corresponding to a performance index to be acquired is determined through a history acquisition record or a corresponding relationship between the performance index and an object identifier, and a Simple Network Management Protocol (SNMP) acquisition interface is called by the object identifier of the performance index to be acquired in the first acquisition table to obtain index data of the performance index to be acquired. Therefore, the performance index data acquisition process does not need manual participation, the labor cost of operation and maintenance is saved, and the error probability is reduced.
The following describes implementation steps of the performance index data acquisition method according to this embodiment with reference to a specific application scenario.
FIG. 2 is a schematic diagram of a process for determining a first acquisition table according to an embodiment of the present application, referring to FIG. 2, beginning with the process of importing an acquisition object; the incoming collection object is an index of the CPU utilization of a certain device (the IP address 192.168.1.1 of the device) for example. In practical application, a web display foreground or a third-party application issues a task according to a required acquisition object format by calling an external access interface provided by a network management system. When sending the collection object, the network management system obtains performance index information, such as a performance index set, including a CPU utilization rate, a memory utilization rate, and the like, through an interface.
Executing the step S201, inquiring manufacturer identification and model, and acquiring oid2kpi corresponding relation;
here, the oid2kpi correspondence represents the correspondence between oid (object id) and kpi (performance index), any managed resource in the SNMP system is represented as an object, oid is the object id, each performance index has its own object id, and the object id of each performance index is not unique.
The vendor identification is a unique identification of the manufacturer of the network device. The manufacturer of the network device may be different from manufacturer to manufacturer, such as the same router, the same arcade router, and the same cisco router. Network devices made by the same manufacturer may also vary in model, such as routers that are also Huacheng, and may be classified in model numbers 220 (for example only) and 230 (for example only). Therefore, when manually inquiring the performance index of a network device, the user needs to remember and input information such as a manufacturer and a model of the network device, then determines the performance index of the network device based on the information, obtains an object identifier of the performance index, and finally obtains performance index data by using the object identifier.
In this embodiment, system object identification information sysObjectID of the network device is collected based on the IP address of the network device, and vendor information and model information corresponding to the sysObjectID are obtained. After the manufacturer information and the model information of the network equipment to be collected are obtained, the corresponding relation between the performance index and the object identification can be obtained by searching a snmp oil 2kpi dictionary table according to the manufacturer information (such as Huashi), the model information (such as 230) and index information to be collected (such as CPU utilization rate). Therefore, the effects of automatically inquiring and acquiring the manufacturer and model information of the network equipment without manual input and memorization are achieved.
For example, standard oid (object identifier) Information of a general MIB (Management Information Base) is collected through an SNMP (Simple Network Management Protocol SNMP) collection interface 1.3.6.1.2.1.1.2, so that a sysObjectID of a Network device (such as the Network device with the aforementioned IP address 192.168.1.1) can be obtained, and corresponding vendor and model Information in a SNMP 2kpi dictionary table is searched through the sysObjectID. The snmp oid2kpi dictionary table is a complete set and contains oid2kpi corresponding relations corresponding to various types of manufacturers.
The implementation of the performance index data acquisition method of the embodiment is based on the SNMP, and the SNMP is briefly described here for easy understanding. SNMP is a standard protocol for managing network nodes (e.g., servers, workstations, routers, switches, etc.) in an IP network. The network managed by the SNMP mainly comprises three parts: managed devices, SNMP agents, Network Management Systems (NMS). Each device managed in the network has a management information base MIB for collecting and storing management information.
The network management system NMS can obtain this information via the SNMP protocol.
The managed devices, also referred to as network elements or network nodes, may be routers, switches, servers or hosts, etc. that support the SNMP protocol.
The SNMP agent is a network management software module on the managed device that holds the relevant management information of the local devices and serves to translate them into SNMP-compatible format to the NMS network management system.
The NMS network management system runs applications to implement the function of monitoring managed devices. The performance index data acquisition method of the embodiment of the application is applied to a Network Management System (NMS).
The method of this embodiment obtains information of performance indexes to be collected, and determines a first collection table corresponding to the performance indexes to be collected according to a historical collection record or a corresponding relationship between the performance indexes and object identifiers. Specifically, determining the first acquisition table corresponding to the performance index to be acquired according to the historical acquisition record or the corresponding relationship between the performance index and the object identifier includes: inquiring an acquisition record table in a database, and if the acquisition record table has a historical acquisition record of the performance index to be acquired, taking the acquisition table in the historical acquisition record as a first acquisition table corresponding to the performance index to be acquired; and if the historical acquisition record of the performance index to be acquired does not exist in the acquisition record table, determining a first acquisition table corresponding to the performance index to be acquired according to the corresponding relation between the performance index and the object identifier.
That is to say, in the embodiment of the present application, step S202 is executed to query the acquisition record table in the database, and the first acquisition table corresponding to the performance index to be acquired is determined only when there is no record of the performance index to be acquired in the acquisition record table, so that the steps can be simplified, and the acquisition efficiency can be improved.
Step S202, inquiring an acquisition record table;
in this step, the collection record table in the database is queried to determine whether the record of the index is collected before.
Step S203, whether a collection record exists or not; if yes, executing step S206, otherwise executing step S204;
in this step, it is determined whether there is a collection record of the performance index to be collected in the collection record table, if there is a record, step S206 is executed, and if there is no record, step S204 is executed.
Step S204, obtaining an acquisition table set according to the corresponding relation between the performance indexes and the object identifications;
since the judgment result in the previous step is that there is no acquisition record of the current performance index to be acquired in the acquisition record table, an acquisition table set is obtained in the current step according to the corresponding relationship between the performance index and the object identifier. Specifically, determining the first acquisition table corresponding to the performance index to be acquired according to the corresponding relationship between the performance index and the object identifier includes: acquiring system object identification information sysObjectID of the network equipment based on an IP address of the network equipment, acquiring manufacturer information and model information corresponding to the sysObjectID according to the sysObjectID, and acquiring a corresponding relation between a performance index and an object identification according to the manufacturer information and the model information; according to the corresponding relation between the performance indexes and the object identification, sequentially determining an acquisition table set corresponding to each performance index to be acquired, wherein the acquisition table set comprises at least one acquisition table; and taking the first acquisition table in each acquisition table set as the first acquisition table corresponding to the performance index to be acquired.
For example, all acquisition table tableids corresponding to kpiId of each performance index are queried from a snmp oil 2kpi dictionary table of the database based on the vendor information and the model information, and the tableids are placed in an acquisition table set, where the acquisition table set includes at least one acquisition table tableId. The kpiId represents an index identifier of an acquisition index, such as indexes of CPU utilization rate, memory utilization rate and the like; the tableId represents an acquisition table identifier, and the acquisition table is an MIB data table storing a corresponding relationship between a performance index (specifically kpiId) and an Object Identifier (OID).
The OID is an identifier of the MIB object provided by the SNMP, such as identifier OID {1.3.6.1.4.1} which is identifiers (vendors), and the number of nodes of the MIB object exceeds 3000. For example, Cisco, Inc. {1.3.6.1.4.1.9}, Noval Novell, Inc. {1.3.6.1.4.1.23}, and Cisco, Inc. {1.3.6.1.4.1.2011 }. Each manufacturer can define the name of the managed object of its own product, so that it can manage through SNMP.
In order to improve the acquisition efficiency, in practical application, the method of this embodiment supports multi-performance index acquisition, for example, 5 data acquisitions, which are respectively an index 1, an index 2, an index 3, an index 4, and an index 5, and then, when the method is applied, an acquisition table set corresponding to the index is sequentially determined from a first index.
Since the OID identifier corresponding to each performance index is not unique, taking the example that the index 1 is the CPU utilization rate, the OID identifiers of devices of different models of the same manufacturer may be different, for example, the OID identifier corresponding to the device of the model 320 is OID1, and the OID identifier corresponding to the device of the model 330 is OID2, when the index is acquired according to the IP address of the network device in the issued task, two OID identifiers may be obtained, and then two acquisition tables (one acquisition table only records the corresponding relationship between one OID and the KPI), such as table1 and table2, are obtained. In this embodiment, table1 and table2 are put into the collection table set of index 1 to obtain the collection table set of the CPU utilization index. By analogy, an acquisition table set with 5 indexes can be obtained. And then, taking the first acquisition table in each acquisition table set as the first acquisition table corresponding to the performance index to be acquired. Here, for example, the collection table identified as table1 is used as the first collection table corresponding to the CPU utilization index.
It should be noted that, after obtaining the corresponding relationship between the performance index and the object identifier from the manufacturer information and the model information, the embodiment screens the corresponding relationship between the performance index and the object identifier, because some object identifiers cannot acquire the required data when the object identifiers corresponding to the performance index are not unique, in order to ensure that the required data can be acquired, in the embodiment, multiple iterations are performed, and the first iteration directly uses the first acquisition table in each acquisition table set as the first acquisition table corresponding to the performance index to be acquired, so as to accelerate the iteration speed.
Step S205, merging to obtain a performance index set, and putting the table identifier of the first acquisition table and the performance index set into a cache;
after determining the first acquisition table corresponding to the performance index to be acquired, the method of this embodiment further includes: combining a plurality of performance indexes to be acquired corresponding to the same first acquisition table to obtain a performance index set to be acquired; storing the table identifier of the first acquisition table and the set of performance indexes to be acquired into a key-value pair set; the key value pair set comprises a plurality of key-value key value pairs, the key of each key-value key value pair is a table identifier of the first acquisition table, and the value is the set of performance indexes to be acquired.
As for 5 performance indexes, after the first acquisition tables are determined, since the first acquisition tables corresponding to each index may be the same, for example, the first acquisition table corresponding to index 1, the first acquisition table corresponding to index 3 is table1, the first acquisition table corresponding to index 2, the first acquisition table corresponding to index 4 and index 5 is table3, if the first acquisition table is sequentially read according to the first acquisition table corresponding to the index to obtain the OID object identifier, the first acquisition table needs to be read 5 times, in this embodiment, in order to improve efficiency, a scheme for merging the indexes is provided, and the specific merging step is: judging the first acquisition table corresponding to each performance index, if the table identification tables 1 of the first acquisition table corresponding to two performance indexes, such as index 1 and index 3, are the same, merging the two performance indexes to obtain a performance index set, such as { index 1 and index 3}, and then putting the performance index set { index 1 and index 3} and the table identification table1 of the first acquisition table corresponding to each performance index set into a cache together.
In order to increase the search speed, the embodiment stores the key-value key value pair mapping manner, that is, the table identifier of the first acquisition table is used as a key, the performance index set is used as a value to construct a key value pair, and the constructed key value pairs are used as elements and placed in the cached key value pair set.
Step S206, the table identifier and the performance index of the first acquisition table are put into a cache;
if data are collected for the current performance index to be collected before, the collection table in the collection record can be directly used as a first collection table of the performance index to be collected, and the table identifier of the first collection table and the current performance index to be collected are placed in the cache.
For example, if the index 5 is collected before, the collection table identifier is obtained according to the collection table of the index 5 in the history collection record, and the collection identifier and the identifier of the index 5 are placed in the cache together. Specifically, the index 5 can be put into a key-value pair set in the cache, and at this time, if the table identifier of the first acquisition table corresponding to the index 5 is matched with the key of any key-value pair of the existing key-value pairs in the key-value pair set, the index 5 can be put into the value of the matched key-value pair, so as to improve the acquisition efficiency,
and step S207, generating an acquisition task by the table identifier of the first acquisition table, and calling the thread in the thread pool for acquisition.
After the table identifier of the first acquisition table corresponding to each performance index is obtained, an acquisition task is generated according to the cached table identifier in this embodiment. In the above example, for table1, a collection task one is generated, a collection thread 1 in the thread pool is called to perform data collection, and for table3, a collection task two is generated, and a collection thread 2 in the thread pool is called to perform data collection. The performance index data collection process of this embodiment is shown in fig. 3,
after the acquisition thread is started, executing step S301 to acquire data for the first time;
specifically, the first data acquisition process includes: reading a key-value pair set to obtain a table identifier of the first acquisition table; determining a first acquisition table corresponding to the table identifier according to the table identifier of the first acquisition table, and obtaining the object identifier of each performance index to be acquired in the performance index set to be acquired from the first acquisition table corresponding to the table identifier; and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of each performance index to be acquired to obtain index data of the performance index to be acquired.
It should be noted that, the key point of this embodiment is how to determine the acquisition table corresponding to the performance index to be acquired and obtain the object identifier OID of the performance index to be acquired, and after obtaining the corresponding identifier OID, call the simple network management protocol SNMP acquisition interface, and obtain the index data of the performance index to be acquired by using the prior art means, therefore, details about the called SNMP acquisition interface and obtaining the performance index data through the SNMP acquisition interface may refer to the description of the prior art, and are not described herein again.
Step S302, whether data are collected or not is judged; if so, step S303 is executed, otherwise, step S304 is executed, and in practical applications, not every object identifier OID may obtain the required index data, so in this step, it is determined whether the index data can be acquired according to the object identifier in the first acquisition table, if the performance index data is acquired, step S303 is executed, and if the performance index data is not acquired, step S304 is executed.
Step S303, generating a collection record and storing the collection record into a database;
specifically, after the index data of the performance index to be collected is obtained, a collection record is generated based on the index identifier of the performance index to be collected, the index data, the table identifier of the collection table, and the collection time, and the collection record is stored in the collection record table in the database. For example, one collection record includes an index identifier kpiId, specific index data (e.g., CPU utilization rate 30%), a table identifier tableId of the collection table, and collection time xxxx.
Therefore, the collection records are put in storage, so that the performance index data of the same equipment can be conveniently collected next time, secondary analysis is not needed, and the data collection efficiency is improved.
Step S304, determining a second collection table set according to the corresponding relation between the performance index and the object identifier;
in this step, if the index data of the performance index to be acquired is not obtained, a second acquisition table corresponding to the performance index to be acquired is determined according to the corresponding relationship between the performance index and the object identifier.
It should be noted that, before determining the second acquisition table, the second acquisition table set is determined according to the corresponding relationship between the performance index and the object identifier, and the determination of the acquisition table set according to the corresponding relationship between the performance index and the object identifier is similar to the foregoing step S204, except that the second acquisition table set obtained in this step excludes the first acquisition table, in other words, the second acquisition table set obtained in this step does not include the first acquisition table, because it can be known from the foregoing description that performance index data is not acquired according to the first acquisition table, so when the second acquisition table is re-determined through secondary analysis, the first acquisition table is excluded to avoid waste of system resources.
S305, arranging the acquisition tables in a descending order according to the occurrence times of the acquisition tables, and determining a second acquisition table;
the method specifically comprises the following steps: according to the corresponding relation between the performance indexes and the object identification, sequentially determining a second acquisition table set corresponding to each performance index to be acquired, wherein the acquisition table set does not comprise a first acquisition table; counting the occurrence times of each acquisition table based on the second acquisition table set; and arranging the acquisition tables in the second acquisition table set in a descending order according to the occurrence frequency of the acquisition tables, and taking the acquisition table arranged at the first position as the second acquisition table.
For example, the indexes to be collected include an index a, an index B, an index C, a collection table set { table1, table2} corresponding to the index a, a collection table set { table1, table2, table3} corresponding to the index B, and a collection table set { table2, table4} corresponding to the index C. Counting the occurrence frequency of the acquisition table, wherein the available table1 occurs for 2 times, the table2 occurs for 3 times, and the table3 and the table4 each occur for 1 time, then after the acquisition tables in each second acquisition table set are sorted in a descending order according to the occurrence frequency, the acquisition table set { table2, table1} corresponding to the index A, the acquisition table set { table2, table1, table3} corresponding to the index B, and the acquisition table set { table2, table4} corresponding to the index C. Then, the second acquisition table corresponding to the index a is table2, the second acquisition table corresponding to the index B is also table2, and the second acquisition table corresponding to the index C is table 2. This results in a new key-value pair (table2, { index A, index B, index C }).
Step S306, collecting based on the table identification of the second collection table;
after the second acquisition table is obtained, based on the object identification of the performance index to be acquired in the second acquisition table, calling a Simple Network Management Protocol (SNMP) acquisition interface to obtain index data of the performance index to be acquired
Note: the acquisition in this step based on the table identifier of the second acquisition table is similar to the aforementioned step S301, except that the step S301 is to search for the object identifier OID of the performance index included in the first acquisition table based on the table identifier of the first acquisition table and perform acquisition based on the object identifier OID, and the step S301 is to perform acquisition based on the object identifier OID of the performance index included in the second acquisition table and perform acquisition based on the object identifier OID.
Step S307, whether data are acquired or not is judged, and if yes, step S303 is executed; otherwise, step S305 is performed.
Judging whether data are acquired or not in the step, if the data are acquired, returning to the step S303, namely generating an acquisition record to be stored, and if the data are not acquired, returning to the step S305 to re-determine the second acquisition table until each acquisition table in the acquisition table set corresponding to the performance index to be acquired is traversed once.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein.
As can be seen from the above, in the performance index data acquisition method of this embodiment, the information of the performance index to be acquired is acquired, the first acquisition table corresponding to the performance index to be acquired is determined according to the historical acquisition record or the corresponding relationship between the performance index and the object identifier, and the simple network management protocol SNMP acquisition interface is invoked based on the object identifier of the performance index to be acquired, so as to obtain the index data of the performance index to be acquired. Therefore, the performance index data acquisition process does not need manual participation, the operation and maintenance labor cost is saved, and the error probability is reduced.
The same technical idea as the foregoing performance index data acquisition method belongs to, an embodiment of the present application further provides a performance index data acquisition apparatus, fig. 4 is a block diagram of the performance index data acquisition apparatus according to an embodiment of the present application, and referring to fig. 4, the performance index data acquisition apparatus 400 according to the present embodiment includes:
an acquisition table determining module 401, configured to obtain information of a performance index to be acquired of the network device, and determine, according to a historical acquisition record or a corresponding relationship between the performance index and an object identifier, a first acquisition table corresponding to the performance index to be acquired; the first acquisition table comprises an object identifier of the performance index to be acquired;
an acquisition module 402, configured to invoke a simple network management protocol SNMP acquisition interface based on the object identifier of the performance index to be acquired, to obtain index data of the performance index to be acquired.
In an embodiment of the present application, the acquisition table determining module 401 is specifically configured to query an acquisition record table in a database; if the historical acquisition record of the performance index to be acquired exists in the acquisition record table, taking the acquisition table in the historical acquisition record as a first acquisition table corresponding to the performance index to be acquired; and if the historical acquisition record of the performance index to be acquired does not exist in the acquisition record table, determining a first acquisition table corresponding to the performance index to be acquired according to the corresponding relation between the performance index and the object identifier.
In an embodiment of the present application, the acquisition table determining module 401 is specifically configured to acquire system object identification information sysObjectID of a network device based on an IP address of the network device, obtain vendor information and model information corresponding to the sysObjectID, and obtain a corresponding relationship between a performance index and an object identifier according to the vendor information and the model information; according to the corresponding relation between the performance indexes and the object identification, sequentially determining an acquisition table set corresponding to each performance index to be acquired, wherein the acquisition table set comprises at least one acquisition table; and taking the first acquisition table in each acquisition table set as the first acquisition table corresponding to the performance index to be acquired.
In one embodiment of the present application, the apparatus further comprises: the merging module is used for merging the performance indexes to be acquired corresponding to the same first acquisition table to obtain a performance index set to be acquired; storing the table identifier of the first acquisition table and the set of performance indexes to be acquired into a key-value pair set; the key value pair set comprises a plurality of key-value key value pairs, the key of each key-value key value pair is a table identifier of the first acquisition table, and the value is the set of performance indexes to be acquired.
In an embodiment of the present application, the collecting module 402 is specifically configured to read the key-value pair set to obtain a table identifier of the first collecting table; determining a first acquisition table corresponding to the table identifier according to the table identifier of the first acquisition table, and obtaining the object identifier of each performance index to be acquired in the performance index set to be acquired from the first acquisition table corresponding to the table identifier; and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of each performance index to be acquired to obtain index data of the performance index to be acquired.
In an embodiment of the present application, the acquisition table determining module 401 is further configured to sequentially determine, according to a correspondence between a performance index and an object identifier, an acquisition table set corresponding to each to-be-acquired performance index, where the acquisition table set does not include a first acquisition table; counting the occurrence times of each acquisition table based on the acquisition table set; arranging the acquisition tables in each acquisition table set in a descending order according to the occurrence frequency of each acquisition table, and taking the acquisition table arranged at the first position as a second acquisition table; the acquisition module 402 is further configured to invoke a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired in the second acquisition table, so as to obtain index data of the performance index to be acquired.
In an embodiment of the application, the apparatus further includes a recording module, configured to generate a collection record based on an index identifier of a performance index to be collected, the obtained index data and collection time, and store the collection record in a collection record table in a database.
It should be noted that, the exemplary explanation of each function executed by each module in the apparatus shown in fig. 4 is consistent with the exemplary explanation in the foregoing method embodiment, and is not repeated here.
To sum up, the performance index data acquisition scheme of the embodiment of the application not only realizes the acquisition of the performance index data of the network equipment, but also more importantly, the acquisition process does not need manual participation (no manual index setting, no input of manufacturer, model and OID identification), the labor cost of operation and maintenance is saved, the error rate is reduced, and the operation and maintenance efficiency is improved.
Note: the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the embodiments of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the embodiments of the present application. In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details.
In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description. Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various application aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that is, the claimed embodiments of the application require more features than are expressly recited in each claim. Rather, as the following claims reflect, application is directed to less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art can adaptively change the modules in the device in the embodiment and arrange them in the embodiment different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification may be replaced by an alternative feature serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that combinations of features of different embodiments are within the scope of the embodiments of the application and form a different embodiment. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a page performance testing apparatus according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing embodiments of the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 5 is a block diagram of an electronic device according to an embodiment of the present application, where the electronic device 500 includes: a processor 501 and a memory 502 storing computer programs executable on the processor 501. A processor 501, configured to execute the steps of the method in the embodiment of the present application when executing the computer program in the memory 502. The memory 502 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 502 has a storage space 503 storing a computer program 804 for performing any of the method steps of the above-described method. The computer program 504 can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a non-transitory computer readable storage medium as shown in fig. 6.
FIG. 6 is a block diagram of a non-transitory computer readable storage medium of one embodiment of the present application. The computer-readable storage medium 600 stores a computer program 504 for performing the steps of the method according to an embodiment of the application, which is readable by the processor 501 of the electronic device 500 and which, when the computer program 504 is executed by the electronic device 500, causes the electronic device 500 to perform the steps of the method described above, in particular the computer program 504 stored by the computer-readable storage medium may perform the method shown in any of the embodiments described above. The computer program 504 may be compressed in a suitable form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the embodiments of the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer.
While the foregoing is directed to embodiments of the present application, other modifications and variations of the present application may be devised by those skilled in the art in light of the above teachings. It should be understood by those skilled in the art that the foregoing detailed description is for the purpose of better explaining the present application, and the scope of protection of the present application shall be governed by the scope of the claims.

Claims (10)

1. A performance index data acquisition method is characterized by comprising the following steps:
acquiring information of performance indexes to be acquired of network equipment, and determining a first acquisition table corresponding to the performance indexes to be acquired according to a historical acquisition record or a corresponding relation between the performance indexes and object identification; the first acquisition table comprises an object identifier of the performance index to be acquired;
and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired to obtain index data of the performance index to be acquired.
2. The method according to claim 1, wherein the determining, according to the historical acquisition record or the corresponding relationship between the performance index and the object identifier, the first acquisition table corresponding to the performance index to be acquired comprises:
inquiring an acquisition record table in a database;
if the historical acquisition record of the performance index to be acquired exists in the acquisition record table, taking the acquisition table in the historical acquisition record as a first acquisition table corresponding to the performance index to be acquired;
and if the historical acquisition record of the performance index to be acquired does not exist in the acquisition record table, determining a first acquisition table corresponding to the performance index to be acquired according to the corresponding relation between the performance index and the object identifier.
3. The method according to claim 2, wherein the determining the first acquisition table corresponding to the performance index to be acquired according to the corresponding relationship between the performance index and the object identifier comprises:
acquiring system object identification information sysObjectID of the network equipment based on an IP address of the network equipment, acquiring manufacturer information and model information corresponding to the sysObjectID, and acquiring a corresponding relation between a performance index and an object identification according to the manufacturer information and the model information;
according to the corresponding relation between the performance indexes and the object identification, sequentially determining an acquisition table set corresponding to each performance index to be acquired, wherein the acquisition table set comprises at least one acquisition table;
and taking the first acquisition table in each acquisition table set as the first acquisition table corresponding to the performance index to be acquired.
4. The method according to any one of claims 1 to 3, wherein after determining the first acquisition table corresponding to the performance index to be acquired, the method further comprises:
combining a plurality of performance indexes to be acquired corresponding to the same first acquisition table to obtain a performance index set to be acquired;
storing the table identifier of the first acquisition table and the set of performance indexes to be acquired into a key-value pair set;
the key value pair set comprises a plurality of key-value key value pairs, the key of each key-value key value pair is a table identifier of the first acquisition table, and the value is the set of performance indexes to be acquired.
5. The method according to claim 4, wherein the calling a Simple Network Management Protocol (SNMP) collection interface based on the object identifier of the performance index to be collected to obtain the index data of the performance index to be collected comprises:
reading the key-value pair set to obtain a table identifier of the first acquisition table;
determining a first acquisition table corresponding to the table identifier according to the table identifier of the first acquisition table, and obtaining the object identifier of each performance index to be acquired in the performance index set to be acquired from the first acquisition table corresponding to the table identifier;
and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of each performance index to be acquired to obtain index data of the performance index to be acquired.
6. The method according to claim 5, wherein after the invoking of the SNMP collection interface based on the object identifier of each performance indicator to be collected, the method further comprises:
if the index data of the performance index to be acquired is not obtained, determining a second acquisition table corresponding to the performance index to be acquired according to the corresponding relation between the performance index and the object identifier, and specifically comprising:
according to the corresponding relation between the performance indexes and the object identification, sequentially determining a second acquisition table set corresponding to each performance index to be acquired, wherein the second acquisition table set does not comprise a first acquisition table;
counting the occurrence times of each acquisition table based on the second acquisition table set;
arranging the acquisition tables in the second acquisition table set in a descending order according to the occurrence frequency of each acquisition table, and taking the acquisition table arranged at the first position as the second acquisition table;
and calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired in the second acquisition table to obtain index data of the performance index to be acquired.
7. A method according to any one of claims 1 to 3, characterized in that after obtaining indicator data of the performance indicator to be collected, the method further comprises:
and generating an acquisition record based on the index identification of the performance index to be acquired, the index data, the table identification of the acquisition table and the acquisition time, and storing the acquisition record into an acquisition record table in a database.
8. A performance index data collection system, comprising:
the acquisition table determining module is used for acquiring information of performance indexes to be acquired of the network equipment and determining a first acquisition table corresponding to the performance indexes to be acquired according to historical acquisition records or the corresponding relation between the performance indexes and the object identification; the first acquisition table comprises an object identifier of the performance index to be acquired;
and the acquisition module is used for calling a Simple Network Management Protocol (SNMP) acquisition interface based on the object identifier of the performance index to be acquired to obtain the index data of the performance index to be acquired.
9. An electronic device, characterized in that the electronic device comprises: a processor, and a memory storing a computer program operable on the processor;
the processor, when executing the computer program in the memory, is adapted to perform the steps of the method of any of claims 1-7.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201910561066.0A 2019-06-26 2019-06-26 Performance index data acquisition method and device Active CN112152824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910561066.0A CN112152824B (en) 2019-06-26 2019-06-26 Performance index data acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910561066.0A CN112152824B (en) 2019-06-26 2019-06-26 Performance index data acquisition method and device

Publications (2)

Publication Number Publication Date
CN112152824A true CN112152824A (en) 2020-12-29
CN112152824B CN112152824B (en) 2023-07-11

Family

ID=73869805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910561066.0A Active CN112152824B (en) 2019-06-26 2019-06-26 Performance index data acquisition method and device

Country Status (1)

Country Link
CN (1) CN112152824B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769923A (en) * 2020-12-31 2021-05-07 成都科来网络技术有限公司 Method, device and storage medium for monitoring network equipment performance index in big data scene
CN115086136A (en) * 2021-03-10 2022-09-20 北京国基科技股份有限公司 Data acquisition and processing method and device based on simple network management protocol

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103516555A (en) * 2013-10-23 2014-01-15 中国科学院信息工程研究所 Network device monitoring method and system
US20140156778A1 (en) * 2012-11-30 2014-06-05 Red Hat Israel, Ltd. Managing a distributed cache for virtual machines
CN105095044A (en) * 2015-06-04 2015-11-25 曙光信息产业(北京)有限公司 SNMP based server monitoring method and apparatus
CN108880867A (en) * 2018-05-31 2018-11-23 腾讯科技(深圳)有限公司 A kind of network equipment collecting method and system
CN108932184A (en) * 2018-06-21 2018-12-04 新华三云计算技术有限公司 monitoring device and method
CN108989089A (en) * 2018-06-22 2018-12-11 迈普通信技术股份有限公司 A kind of device data acquisition methods, equipment and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140156778A1 (en) * 2012-11-30 2014-06-05 Red Hat Israel, Ltd. Managing a distributed cache for virtual machines
CN103516555A (en) * 2013-10-23 2014-01-15 中国科学院信息工程研究所 Network device monitoring method and system
CN105095044A (en) * 2015-06-04 2015-11-25 曙光信息产业(北京)有限公司 SNMP based server monitoring method and apparatus
CN108880867A (en) * 2018-05-31 2018-11-23 腾讯科技(深圳)有限公司 A kind of network equipment collecting method and system
CN108932184A (en) * 2018-06-21 2018-12-04 新华三云计算技术有限公司 monitoring device and method
CN108989089A (en) * 2018-06-22 2018-12-11 迈普通信技术股份有限公司 A kind of device data acquisition methods, equipment and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769923A (en) * 2020-12-31 2021-05-07 成都科来网络技术有限公司 Method, device and storage medium for monitoring network equipment performance index in big data scene
CN115086136A (en) * 2021-03-10 2022-09-20 北京国基科技股份有限公司 Data acquisition and processing method and device based on simple network management protocol
CN115086136B (en) * 2021-03-10 2023-07-14 北京国基科技股份有限公司 Data acquisition and processing method and device based on simple network management protocol

Also Published As

Publication number Publication date
CN112152824B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN110245078B (en) Software pressure testing method and device, storage medium and server
CN111522922B (en) Log information query method and device, storage medium and computer equipment
CN110855473B (en) Monitoring method, device, server and storage medium
CN109194617B (en) Automatic parsing and packaging method and device for XML (extensive markup language) message
JP2015092666A (en) Node de-duplication in network monitoring system
AU2017214389A1 (en) Cloud-based platform instrumentation and monitoring system for maintenance of user-configured programs
CN111614483A (en) Link monitoring method and device, storage medium and computer equipment
CN112152824B (en) Performance index data acquisition method and device
CN113704790A (en) Abnormal log information summarizing method and computer equipment
US10083070B2 (en) Log file reduction according to problem-space network topology
CN110278101B (en) Resource management method and equipment
CN112363935A (en) Data joint debugging method and device, electronic equipment and storage medium
US9922539B1 (en) System and method of telecommunication network infrastructure alarms queuing and multi-threading
US10009216B2 (en) Repeat execution of root cause analysis logic through run-time discovered topology pattern maps
CN114070755B (en) Virtual machine network flow determination method and device, electronic equipment and storage medium
CN103532737A (en) Method, device and system for processing various types of alarms
CN110943887B (en) Probe scheduling method, device, equipment and storage medium
CN112463549A (en) Auditing method, device and equipment of cloud platform and computer readable storage medium
CN112187509A (en) Multi-architecture cloud platform execution log management method, system, terminal and storage medium
CN116760571A (en) Asset identification method, device, electronic equipment and storage medium
CN114297037A (en) Alarm clustering method and device
CN111756869A (en) DNS resolution server address collection method and system
CN108459940B (en) Configuration information modification method and device of application performance management system and electronic equipment
CN108595190B (en) Report tool building method and device, computer device and storage medium
US10469319B2 (en) Certification tool gap analyzer

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