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

Performance index data acquisition method and device Download PDF

Info

Publication number
CN112152824B
CN112152824B CN201910561066.0A CN201910561066A CN112152824B CN 112152824 B CN112152824 B CN 112152824B CN 201910561066 A CN201910561066 A CN 201910561066A CN 112152824 B CN112152824 B CN 112152824B
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.)
Active
Application number
CN201910561066.0A
Other languages
Chinese (zh)
Other versions
CN112152824A (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.)
Ultrapower Software Co ltd
Original Assignee
Ultrapower 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 Ultrapower Software Co ltd filed Critical Ultrapower 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

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 identifiers; the first acquisition table comprises object identifiers of the performance indexes to be acquired; and calling a simple network management protocol SNMP acquisition interface based on the object identification 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 to be manually participated, so that 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 KPIs (Key Performance Indicator, key performance indexes) in network management, and through the performance index data, operation and maintenance personnel can count and observe the safety, the running condition and the use condition of system resources of network element equipment and can also locate problems to assist in fault processing.
The current telecommunication network has large scale, and is used for various network devices, such as switches, routers, firewalls and the like, each manufacturer device comprises a plurality of types, the corresponding acquisition tables of different types are different, the data of some KPI indexes of the devices are not a simple matter to acquire, and the professional technical requirements on operation and maintenance personnel are high, for example, the operation and maintenance personnel need to set the indexes to be acquired and search or memorize the used MIB (Management Information Base ) OID (Object Identifier, object identifier is also called the domain name of the Internet of things), and the process is completed manually and 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 marks, save operation and maintenance labor cost and reduce error probability.
According to one aspect of the present application, there is provided a performance index data acquisition method, including:
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 identifiers; the first acquisition table comprises object identifiers of the performance indexes to be acquired;
And calling a simple network management protocol SNMP acquisition interface based on the object identification 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, including:
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 a historical acquisition record or a corresponding relation between the performance indexes and object identifiers; the first acquisition table comprises object identifiers of the performance indexes to be acquired;
and the acquisition module is used for calling a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired to obtain index data of the performance index to be acquired.
According to still another aspect of the present application, there is provided an electronic device including: a processor, and a memory storing a computer program executable on the processor;
the processor is configured to perform the steps of the method according to one aspect of the present application when executing the computer program in the memory.
According to yet another aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to one aspect of the present application.
The beneficial effects are that: by applying the acquisition scheme of the performance index data, the first acquisition table corresponding to the performance index to be acquired is determined according to the history acquisition record or the corresponding relation between the performance index and the object identifier by acquiring the information of the performance index to be acquired of the network equipment, 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 to be manually participated, 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 one embodiment of the present application;
FIG. 2 is a flow chart of determining a first acquisition table according to one embodiment of the present application;
FIG. 3 is a schematic diagram of an acquisition flow in accordance with one embodiment of the present application;
FIG. 4 is a block diagram of a performance index data acquisition device according to one embodiment of the present application;
FIG. 5 is a block diagram of an electronic device according to one embodiment of the present application;
FIG. 6 is a block diagram of the architecture of a non-transitory computer readable storage medium of one embodiment of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings. It will be apparent that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The inventive concept of the embodiment of the application is as follows: in the prior art, the index data acquisition needs to manually set a certain index and needs to use which OID to acquire, namely, the corresponding relation between the acquired index and the object identifier OID is determined, in practical application, there may be a case that a maintainer does not know the OID corresponding to the acquired index, then he needs to consult a manufacturer of equipment, and find the OID identifier corresponding to the acquired index from a plurality of information. Therefore, the special technical requirements on operation and maintenance personnel are high, and index data acquisition efficiency is low because of the fact that mistakes are easy to occur manually. In this regard, the embodiment of the present application automatically completes the process of searching the OID object identifiers of the acquisition indicators on the basis of accumulating the OID object identifiers corresponding to a large number of KPI indicators. Compared with a manual setting searching mode, the method has the advantages that 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, referring to fig. 1, the performance index data acquisition method of the present 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 a historical acquisition record or a corresponding relation between the performance indexes and object identifiers;
the first acquisition table comprises object identifiers of the performance indexes to be acquired;
step S102, based on the object identification of the performance index to be acquired, a simple network management protocol SNMP acquisition interface is called to obtain index data of the performance index to be acquired.
As can be seen from fig. 1, in the performance index data collection method of this embodiment, a first collection table corresponding to the performance index to be collected is determined according to a history collection record or a correspondence between the performance index and an object identifier, and the object identifier of the performance index to be collected in the first collection table invokes a simple network management protocol SNMP collection interface to obtain index data of the performance index to be collected. Therefore, the performance index data acquisition process does not need to be manually participated, the labor cost of operation and maintenance is saved, and the error probability is reduced.
The implementation steps of the performance index data acquisition method of the present embodiment are described below with reference to a specific application scenario.
FIG. 2 is a schematic flow chart of determining a first acquisition table according to one embodiment of the present application, see FIG. 2, and the flow begins with an incoming acquisition object; here, the incoming acquisition object is an index of CPU utilization of an apparatus (IP address 192.168.1.1 of the apparatus) for acquisition. In practical application, the web shows a foreground or a third party application, and performs task issuing according to a required acquisition object format by calling an external access interface provided by a network management system. When issuing the acquisition object, the network management system acquires performance index information, such as a performance index set, including CPU utilization rate, memory utilization rate and the like, through an interface.
Step S201 is executed, the manufacturer identification and model are inquired, and the corresponding relation of oid2kpi is obtained;
the oid-kpi correspondence here represents the correspondence between oid (object identifier) and kpi (performance index), any managed resource in the SNMP system is represented as an object, oid is an object identifier, each performance index has its own object identifier, and the object identifier of each performance index is not unique.
The vendor identification is a unique identification of the manufacturer of the network device. The manufacturer is different, and the manufacturer identification of the network device is different, such as the same router, the Huacheng router and the Cisco router are different. The network devices produced by the same manufacturer are also distinguished by model numbers, such as routers, which are also denoted by the name "Hua," and can be classified into 220 (by way of example only) and 230 (by way of example only). Therefore, when the performance index of a network device is manually inquired, the information of the manufacturer, the model and the like of the network device is needed to be memorized and input, then the performance index of the network device is determined based on the information, the object identification of the performance index is obtained, and finally the performance index data is obtained by utilizing the object identification.
In this embodiment, based on the IP address of the network device, the system object identification information sysObjectID of the network device is collected, and vendor information and model information corresponding to the sysObjectID are obtained. After manufacturer information and model information of the network equipment to be acquired are obtained, the corresponding relation between the performance index and the object identifier can be obtained by searching a snmpoid2kpi dictionary table according to the manufacturer information (such as Hua Cheng), the model information (such as 230) and the index information to be acquired (such as CPU utilization rate). Therefore, the automatic inquiry and acquisition of the manufacturer and model information of the network equipment are realized, and the effects of manual input and identification are not required.
For example, standard OID (Object Identifier) information of a common MIB (Management Information Base ) is collected through an SNMP (Simple Network Management Protocol, simple network management protocol SNMP) collection interface 1.3.6.1.2.1.1.2, and a sysObjectID of a network device (such as the aforementioned network device with an IP address of 192.168.1.1) can be obtained, and manufacturer and model information corresponding to the snmpoid2kpi dictionary table is searched through the sysObjectID. The snmpoid2kpi dictionary table is a complete set and contains oid2kpi corresponding relations corresponding to various types of manufacturers.
The implementation of the performance index data collection method of the present embodiment is based on SNMP, and a brief description of SNMP is provided herein for ease of 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 SNMP is mainly composed of three parts: managed devices, SNMP agents, network management systems (NMS, network Management System). Each device managed in the network has a management information base MIB for collecting and storing management information.
Through the SNMP protocol, the network management system NMS can obtain this information.
The managed devices, also called network elements or network nodes, may be routers, switches, servers or hosts, etc. supporting the SNMP protocol.
The SNMP agent is a network management software module on the managed device that has the relevant management information of the local device and is used to convert them into a SNMP-compatible format for delivery to the NMS network management system.
The NMS network management system runs applications to implement the function of monitoring the managed devices. The performance index data acquisition method is applied to the NMS.
According to the method, information of the performance index to be acquired is acquired, and a first acquisition table corresponding to the performance index to be acquired is determined according to a historical acquisition record or a corresponding relation between the performance index and an object identifier. Specifically, according to the corresponding relation between the historical acquisition record or the performance index and the object identifier, determining the first acquisition table corresponding to the performance index to be acquired includes: inquiring an acquisition record table in a database, and taking the acquisition table in the history acquisition record as a first acquisition table corresponding to the performance index to be acquired if the history acquisition record of the performance index to be acquired exists in the acquisition record table; 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, in the embodiment of the present application, step S202 is executed first to query the collection record table in the database, and the first collection table corresponding to the performance index to be collected is determined only when there is no record of the performance index to be collected in the collection record table, so that the steps can be simplified, and the collection efficiency can be improved.
Step S202, inquiring an acquisition record table;
in this step, the collection record list in the database is queried to determine whether the record of the index is collected before.
Step S203, whether an acquisition record exists; if yes, go to step S206, otherwise go to step S204;
in this step, it is determined whether there is an acquisition record of the performance index to be acquired in the acquisition record table, if so, step S206 is executed, and if not, step S204 is executed.
Step S204, obtaining an acquisition table set according to the corresponding relation between the performance index and the object identifier;
since the judgment result in the previous step is that the acquisition record table has no acquisition record of the current performance index to be acquired, the acquisition table set is obtained according to the corresponding relation between the performance index and the object identifier in the previous step. Specifically, according to the corresponding relation between the performance index and the object identifier, determining the first acquisition table corresponding to the performance index to be acquired includes: acquiring system object identification information sysObjectID of the network equipment based on the IP address of the network equipment, acquiring manufacturer information and model information corresponding to the sysObjectID according to the sysObjectID, and acquiring the 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 identifiers, sequentially determining acquisition table sets corresponding to the performance indexes to be acquired, wherein each acquisition table set comprises at least one acquisition table; and taking the first acquisition table in each acquisition table set as a first acquisition table corresponding to the performance index to be acquired.
For example, querying all acquisition tables tabld corresponding to kpiId of each performance index from a snmpoid2kpi dictionary table of a database based on the vendor information and the model information, and placing the tabld into an acquisition table set, wherein the acquisition table set comprises at least one acquisition table tabld. The kpiId here represents index identification of the 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 correspondence relationship between performance indexes (specifically kpiId) and Object Identifiers (OIDs).
The OID here is an identifier of MIB objects provided by SNMP, such as identifier OID {1.3.6.1.4.1}, i.e. entries, and the number of nodes to which the OID belongs exceeds 3000. For example, {1.3.6.1.4.1.9}, nowil Novell, cisco, {1.3.6.1.4.1.23}, hua, {1.3.6.1.4.1.2011}. Each vendor can define the managed object name of its own product so that it can be managed through SNMP.
In order to improve the acquisition efficiency, in practical application, the method of the embodiment supports multi-performance index acquisition, for example, 5 data acquisition of index 1, index 2, index 3, index 4 and index 5 are respectively performed, and then the acquisition table set corresponding to the index is sequentially determined from the first index during application.
Since the OID identifiers corresponding to the performance indexes are not unique, taking the CPU utilization as an example, the OID identifiers of different types of equipment of the same manufacturer may be different, for example, the OID identifier corresponding to the equipment with model 320 is OID1, the OID identifier corresponding to the equipment with model 330 is OID2, and then when the index of the CPU utilization is collected according to the IP address of the network equipment in the issuing task, two OID identifiers may be obtained, and further two collection tables (one collection table only records the corresponding relationship between one type of OID and KPI), for example, table1 and table2 may be obtained. In this embodiment, table1 and table2 are put into the collection table set of index 1, so as to obtain the collection table set of CPU utilization index. Similarly, a collection of 5 index acquisition tables can be obtained. And then, taking the first acquisition table in each acquisition table set as a first acquisition table corresponding to the performance index to be acquired. Here, for example, an acquisition table whose table is identified as table1 is used as the first acquisition table corresponding to the CPU utilization index.
It should be noted that, after the correspondence between the performance index and the object identifier is obtained from the vendor information and the model information, the embodiment screens the correspondence between the performance index and the object identifier, because when the object identifier corresponding to the performance index is not unique, some object identifiers cannot collect the required data, so in order to ensure that the required data can be collected, in this embodiment, multiple iterations are performed, and the first round directly uses the first collection table in each collection table set as the first collection table corresponding to the performance index to be collected, so as to accelerate the iteration speed.
Step S205, merging to obtain a performance index set, and putting the table identification of the first acquisition table into a cache;
after determining the first acquisition table corresponding to the performance index to be acquired, the method of the embodiment further includes: combining a plurality of to-be-acquired performance indexes corresponding to the same first acquisition table to obtain a to-be-acquired performance index set; storing the table identifier of the first acquisition table and the to-be-acquired performance index set into a key value pair set; the key-value pair set comprises a plurality of key-value pairs, wherein key keys of the key-value pairs are table identifiers of the first acquisition table, and value is the performance index set to be acquired.
For the above example, after determining the first acquisition table for the 5 performance indexes, since the first acquisition tables corresponding to the indexes may be the same, for example, the first acquisition table corresponding to the index 1, the first acquisition table corresponding to the index 3 is table1, the index 2, the first acquisition tables corresponding to the index 4 and the index 5 are table3, if the first acquisition tables are sequentially read according to the first acquisition table corresponding to the index to obtain the OID object identifier, then the first acquisition tables need to be read for 5 times, in this embodiment, in order to improve the efficiency, a scheme for merging the indexes is provided, and the specific merging steps are as follows: judging the first acquisition table corresponding to each performance index, if the table identifiers table1 of the first acquisition table corresponding to the two performance indexes such as index 1 and index 3 are the same, combining 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 identifier table1 of the first acquisition table corresponding to each performance index set into a cache together.
In order to improve the searching speed, the method of key-value key pair mapping is adopted for storage in this embodiment, that is, the table identifier of the first collection table is used as a key, the performance index set is used as a value to construct key pairs, the constructed key pairs are used as elements to be put into the cached key pair set, and it can be understood that the elements in the key pair set are key pairs.
Step S206, the table identification of the first acquisition table and the performance index are put into a cache;
if the current performance index to be acquired is acquired, the acquisition table in the acquisition record can be directly used as a first acquisition table of the performance index to be acquired, and the table identifier of the first acquisition table and the current performance index to be acquired are put into a cache.
For example, if the index 5 is collected before, according to the collection table of the index 5 in the history collection record, the collection table identifier is obtained, and the collection identifier and the identifier of the index 5 are put into the cache together. In particular, the index 5 can be put into the value of any key value pair in the existing key value pair in the key value pair set if the table identifier of the first acquisition table corresponding to the index 5 is matched with the key of the key value pair, so as to improve the acquisition efficiency,
Step S207, generating an acquisition task by the table identification of the first acquisition table, and calling the threads in the thread pool for acquisition.
After obtaining the table identifier of the first acquisition table corresponding to each performance index, in this embodiment, an acquisition task is generated according to the cached table identifier. For the example, generating the first acquisition task for the table1, calling the acquisition thread 1 in the thread pool to acquire data, generating the second acquisition task for the table3, and calling the acquisition thread 2 in the thread pool to acquire data. The flow of collection of performance index data of this embodiment is shown in figure 3,
after the acquisition thread is started, step S301 is executed 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 object identifiers of all the performance indexes 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 identification of each performance index to be acquired to obtain index data of the performance index to be acquired.
It should be noted that, in this embodiment, how to determine the collection table corresponding to the performance index to be collected and obtain the object identifier OID of the performance index to be collected, and call the SNMP collection interface of the simple network management protocol after obtaining the corresponding identifier OID, so that the index data of the performance index to be collected may be implemented by using the prior art means, so details about the called SNMP collection interface and obtaining the performance index data through the SNMP collection interface may be referred to the description of the prior art, and are not repeated herein.
Step S302, whether data are acquired or not; if yes, step S303 is executed, otherwise step S304 is executed, in practical application, not every object identifier OID can obtain the required index data, so in this step, it is determined whether the index data can be collected according to the object identifier in the first collection table, if the performance index data is collected, step S303 is executed, and if the performance index data is not collected, step S304 is executed.
Step S303, generating an acquisition record and storing the acquisition record in a database;
specifically, after index data of the performance index to be acquired is obtained, an acquisition record is generated based on the index identifier of the performance index to be acquired, the index data, the table identifier of the acquisition table and the acquisition time, and the acquisition record is stored in an acquisition record table in a 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 a collection table, and a collection time xxxx.
Therefore, by warehousing the acquisition record, the next acquisition of the performance index data of the same equipment is facilitated, secondary analysis is not needed, and the data acquisition efficiency is improved.
Step S304, determining a second collection table set through the corresponding relation between the performance index and the object identifier;
in the step, 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.
It should be noted that, before determining the second acquisition table, the second acquisition table set is determined according to the correspondence between the performance index and the object identifier, and the acquisition table set is determined according to the correspondence between the performance index and the object identifier, which is similar to the step S204, except that the first acquisition table is excluded from the second acquisition table set obtained in this step, in other words, the second acquisition table set obtained in this step does not include the first acquisition table, because it is known from the foregoing description that the performance index data is not acquired according to the first acquisition table, when the second acquisition table is redetermined by performing the secondary analysis, the first acquisition table is excluded from the second acquisition table, so as to avoid the waste of system resources.
Step S305, arranging the acquisition tables in 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 identifiers, 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 sets in a descending order according to the occurrence times of the acquisition tables, and taking the acquisition table arranged at the first position as a second acquisition table.
For example, the to-be-acquired indexes include an index a, an index B, an index C, an acquisition table set { table1, table2} corresponding to the index a, an acquisition table set { table1, table2, table3} corresponding to the index B, and an acquisition table set { table2, table4} corresponding to the index C. Counting the occurrence times of the acquisition tables to obtain 2 times of occurrence of table1, 3 times of occurrence of table2, 1 time of occurrence of each of table3 and table4, and arranging acquisition table sets { table2, table1} corresponding to the index A, acquisition table sets { table2, table1, table3} corresponding to the index B, and acquisition table sets { table2, table4} corresponding to the index C in descending order of the acquisition tables in each second acquisition table set according to the occurrence times. Then, the second acquisition table corresponding to the index a is table2, the second acquisition table corresponding to the index B is table2, and the second acquisition table corresponding to the index C is table2. Thus, a new key value pair (table 2, { pointer a, pointer B, pointer C }) is obtained.
Step S306, collecting based on the table identification of the second collection table;
after the second acquisition table is obtained, calling a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired in the second acquisition table to obtain index data of the performance index to be acquired
Note that: the step of collecting based on the table identifier of the second collection table is similar to the step S301, in which the step S301 is to search for the object identifier OID of the performance index included in the first collection table based on the table identifier of the first collection table and collect based on the object identifier OID, and the step is to collect based on the object identifier OID of the performance index included in the second collection table and collect based on the object identifier OID.
Step S307, if data is collected, executing step S303; otherwise, step S305 is performed.
In this step, it is determined whether data is collected, if data is collected, the step S303 is executed again, that is, the collection record is generated and put in storage, and if data is not collected, the step S305 is executed again until each collection table in the collection table set corresponding to the performance index to be collected is traversed once.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in other sequences than those illustrated or otherwise described herein.
As can be seen from the above, in the method for acquiring performance index data of the present embodiment, by acquiring information of a performance index to be acquired, according to a history acquisition record or a correspondence between the performance index and an object identifier, a first acquisition table corresponding to the performance index to be acquired is determined, and based on the object identifier of the performance index to be acquired, a simple network management protocol SNMP acquisition interface is invoked to obtain the index data of the performance index to be acquired. Therefore, the performance index data acquisition process does not need to be manually participated, the operation and maintenance labor cost is saved, and the error probability is reduced.
As well as the aforementioned performance index data collection method belongs to a technical concept, the embodiment of the present application further provides a performance index data collection device, fig. 4 is a block diagram of the performance index data collection device according to an embodiment of the present application, referring to fig. 4, a performance index data collection device 400 of the present embodiment includes:
the acquisition table determining module 401 is configured to obtain information of a performance index to be acquired of a network device, and determine a first acquisition table corresponding to the performance index to be acquired according to a historical acquisition record or a corresponding relationship between the performance index and an object identifier; the first acquisition table comprises object identifiers of the performance indexes to be acquired;
And the acquisition module 402 is configured to invoke a simple network management protocol SNMP acquisition interface based on the object identifier of the performance index to be acquired, so as to obtain index data of the performance index to be acquired.
In one 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 one embodiment of the present application, the acquisition table determining module 401 is specifically configured to acquire, based on an IP address of the network device, a system object identification information sysObjectID of the network device, obtain vendor information and model information corresponding to the sysObjectID, and obtain, according to the vendor information and the model information, a correspondence between a performance index and an object identification; according to the corresponding relation between the performance indexes and the object identifiers, sequentially determining acquisition table sets corresponding to the performance indexes to be acquired, wherein the acquisition table sets comprise at least one acquisition table; and taking a first acquisition table in each acquisition table set as a 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 a plurality of to-be-acquired performance indexes corresponding to the same first acquisition table to obtain a to-be-acquired performance index set; storing the table identifier of the first acquisition table and the to-be-acquired performance index set into a key value pair set; the key-value pair set comprises a plurality of key-value pairs, wherein key keys of the key-value pairs are table identifiers of the first acquisition table, and value is the performance index set to be acquired.
In one embodiment of the present application, the collection module 402 is specifically configured to read the set of key value pairs to obtain a table identifier of the first collection table; determining a first acquisition table corresponding to the table identifier according to the table identifier of the first acquisition table, and obtaining object identifiers of all the performance indexes 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 identification of each performance index to be acquired to obtain index data of the performance index to be acquired.
In one embodiment of the present application, the acquisition table determining module 401 is further configured to sequentially determine an acquisition table set corresponding to each performance index to be acquired according to a corresponding relationship between the performance index and the object identifier, where the acquisition table set does not include the first acquisition table; counting the occurrence times of each acquisition table based on the acquisition table set; the acquisition tables in the acquisition table sets are arranged in a descending order according to the occurrence times of the acquisition tables, and the acquisition table arranged at the first position is used as a second acquisition table; the collection module 402 is further configured to invoke a simple network management protocol SNMP collection interface based on the object identifier of the performance index to be collected in the second collection table, so as to obtain index data of the performance index to be collected.
In one embodiment of the present application, the apparatus further includes a recording module, configured to generate an acquisition record based on the index identifier of the performance index to be acquired, the obtained index data, and the acquisition time, and store the acquisition record in an acquisition record table in the database.
It should be noted that, the illustration of each function executed by each module in the apparatus shown in fig. 4 is consistent with the illustration in the foregoing method embodiment, and will not be repeated here.
In summary, according to the performance index data acquisition scheme of the embodiment of the application, not only is the acquisition of the performance index data of the network equipment realized, but also the acquisition process does not need to be manually participated (no manual setting of indexes and no input of manufacturer, model and OID identifiers are needed), so that the labor cost of operation and maintenance is saved, the error probability is reduced, and the operation and maintenance efficiency is improved.
Note that: the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the teachings herein. The required structure for the construction of such devices is apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It will be 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 the above description of specific languages is provided for disclosure of enablement and best mode 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 present 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 above description of exemplary embodiments of the application, various features of 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's aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed embodiments of the application claim more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in 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.
The modules in the apparatus in the embodiment can be adaptively changed by those skilled in the art and they are disposed in an 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. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that combinations of features of the different embodiments are within the scope of the embodiments of the application and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present embodiments 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 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 may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present application may also be embodied as an apparatus or device program (e.g., computer program and computer program product) for performing a portion or all of the methods described herein. Such a program embodying the embodiments of the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided 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 a computer program executable on said processor 501. A processor 501 is configured to execute the steps of the method in the embodiments 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. Memory 502 has storage space 503 storing a computer program 804 for performing any of the method steps described above. The computer program 504 may 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 the architecture 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 the embodiments of the present application, which may be read by the processor 501 of the electronic device 500, 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 in 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 may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer.
The foregoing is merely a specific implementation of the present application and other modifications and variations can be made by those skilled in the art based on the above-described examples in light of the above teachings. It is to be understood by persons skilled in the art that the foregoing detailed description is provided for the purpose of illustrating the present application in a better manner, and that the scope of the present application is defined by the appended claims.

Claims (8)

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 identifiers; the first acquisition table comprises object identifiers of the performance indexes to be acquired;
invoking a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired to obtain index data of the performance index to be acquired;
the determining the first acquisition table corresponding to the performance index to be acquired according to the corresponding relation between the performance index and the object identifier comprises the following steps:
acquiring system object identification information sysObjectID of the network equipment based on the IP address of the network equipment, obtaining manufacturer information and model information corresponding to the sysObjectID, and searching a snmpoid2kpi dictionary table according to the manufacturer information and the model information to obtain a corresponding relation between a performance index and an object identification; according to the corresponding relation between the performance indexes and the object identifiers, sequentially determining an acquisition table set corresponding to each performance index to be acquired from the snmpoid2kpi dictionary table, wherein the acquisition table set comprises at least one acquisition table; taking a first acquisition table in each acquisition table set as a first acquisition table corresponding to the performance index to be acquired;
After the simple network management protocol SNMP acquisition interface is called based on the object identification of each performance index to be acquired, the method further comprises the following steps:
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, wherein the second acquisition table specifically comprises:
according to the corresponding relation between the performance indexes and the object identifiers, sequentially determining second collection table sets corresponding to the performance indexes to be collected, wherein the second collection table sets do not comprise the first collection table; counting the occurrence times of each acquisition table based on the second acquisition table set; the acquisition tables in the second acquisition table sets are arranged in a descending order according to the occurrence times of the acquisition tables, and the acquisition table arranged at the first position is used as a second acquisition table; and calling a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired in the second acquisition table to obtain index data of the performance index to be acquired.
2. The method of claim 1, wherein determining the first acquisition table corresponding to the performance index to be acquired according to the historical acquisition record or the correspondence between the performance index and the object identifier 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 1 or 2, wherein after determining the first acquisition table corresponding to the performance index to be acquired, the method further comprises:
combining a plurality of to-be-acquired performance indexes corresponding to the same first acquisition table to obtain a to-be-acquired performance index set;
storing the table identifier of the first acquisition table and the to-be-acquired performance index set into a key value pair set;
the key-value pair set comprises a plurality of key-value pairs, wherein key keys of the key-value pairs are table identifiers of the first acquisition table, and value is the performance index set to be acquired.
4. The method of claim 3, wherein the calling a simple network management protocol SNMP collection interface based on the object identification of the performance indicator to be collected to obtain the indicator data of the performance indicator 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 object identifiers of all the performance indexes 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 identification of each performance index to be acquired to obtain index data of the performance index to be acquired.
5. The method according to claim 1 or 2, characterized in that after obtaining the index data of the performance index to be acquired, the method further comprises:
generating an acquisition record based on an index identifier of the performance index to be acquired, index data, a table identifier of an acquisition table and acquisition time, and storing the acquisition record into an acquisition record table in a database.
6. A performance index data acquisition device, 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 a historical acquisition record or a corresponding relation between the performance indexes and object identifiers; the first acquisition table comprises object identifiers of the performance indexes to be acquired; the method comprises the steps of acquiring system object identification information sysObjectID of network equipment based on an IP address of the network equipment, obtaining manufacturer information and model information corresponding to the sysObjectID, and searching a snmpoid2kpi dictionary table according to the manufacturer information and the model information to obtain a corresponding relation between a performance index and an object identification; according to the corresponding relation between the performance indexes and the object identifiers, sequentially determining an acquisition table set corresponding to each performance index to be acquired from the snmpoid2kpi dictionary table, wherein the acquisition table set comprises at least one acquisition table; taking a first acquisition table in each acquisition table set as a first acquisition table corresponding to the performance index to be acquired;
The acquisition module is used for calling a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired to obtain index data of the performance index to be acquired;
the acquisition table determining module is further configured to sequentially determine an acquisition table set corresponding to each performance index to be acquired according to a corresponding relationship between the performance index and the object identifier if the index data of the performance index to be acquired is not obtained, where the acquisition table set does not include the first acquisition table; counting the occurrence times of each acquisition table based on the acquisition table set; the acquisition tables in the acquisition table sets are arranged in a descending order according to the occurrence times of the acquisition tables, and the acquisition table arranged at the first position is used as a second acquisition table;
and the acquisition module is also used for calling a simple network management protocol SNMP acquisition interface based on the object identification of the performance index to be acquired in the second acquisition table to obtain index data of the performance index to be acquired.
7. An electronic device, the electronic device comprising: a processor, and a memory storing a computer program executable on the processor;
the processor being adapted to perform the steps of the method of any of claims 1-5 when executing the computer program in the memory.
8. A non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the steps of the method according to any of claims 1-5.
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 CN112152824A (en) 2020-12-29
CN112152824B true 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)

Families Citing this family (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
CN115086136B (en) * 2021-03-10 2023-07-14 北京国基科技股份有限公司 Data acquisition and processing method and device based on simple network management protocol

Citations (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8949320B2 (en) * 2012-11-30 2015-02-03 Red Hat Israel, Ltd. Managing a distributed cache for virtual machines

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN112152824A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
CN110245078B (en) Software pressure testing method and device, storage medium and server
CN110855473B (en) Monitoring method, device, server and storage medium
US20160098419A1 (en) Automatic correlation of dynamic system events within computing devices
CA3141329A1 (en) Request link tracking method and service request processing method
CN112152824B (en) Performance index data acquisition method and device
US10009216B2 (en) Repeat execution of root cause analysis logic through run-time discovered topology pattern maps
AU2017214389A1 (en) Cloud-based platform instrumentation and monitoring system for maintenance of user-configured programs
CN113704790A (en) Abnormal log information summarizing method and computer equipment
US10089167B2 (en) Log file reduction according to problem-space network topology
US9922539B1 (en) System and method of telecommunication network infrastructure alarms queuing and multi-threading
CN103532737A (en) Method, device and system for processing various types of alarms
US8166143B2 (en) Methods, systems and computer program products for invariant representation of computer network information technology (IT) managed resources
CN107330031B (en) Data storage method and device and electronic equipment
CN108037948A (en) Script management method, apparatus and system
CN112187509A (en) Multi-architecture cloud platform execution log management method, system, terminal and storage medium
CN108197253B (en) Equipment query method, device and equipment of cloud monitoring platform
CN109683989A (en) The automatic acquiring method and device of incidence relation between a kind of configuration item
CN111698109A (en) Method and device for monitoring log
CN114070755B (en) Virtual machine network flow determination method and device, electronic equipment and storage medium
CN114817300A (en) Log query method based on SQL (structured query language) statements and application thereof
CN111221847B (en) Monitoring data storage method, device and computer readable storage medium
CN114297037A (en) Alarm clustering method and device
CN115878721A (en) Data synchronization method, device, terminal and computer readable storage medium
CN110708208B (en) Monitoring data acquisition method and device, storage medium and terminal
CN112436993B (en) VPN private line discovery method and device based on configuration file analysis

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