A method, device, electronic device and storage medium for collecting monitoring metrics
By obtaining the management information database and OID collection of monitoring equipment, analyzing monitoring indicators, and using scheduling tasks to quickly query monitoring indicator information, the problem of difficulty in obtaining private OID values of monitoring network equipment in the existing technology is solved, and efficient monitoring indicator collection is achieved.
Patent Information
- Application Number
- CN202111611991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-12-27
AI Technical Summary
The prior art cannot effectively obtain private OID values when monitoring network devices, resulting in improper use of manual analysis and scanning tools, which consumes huge time and development costs, and is inefficient.
By obtaining the management information database of the monitoring device, analyzing the monitoring indicators, obtaining the monitoring database and OID collection, and using scheduling tasks to quickly query the indicator information to avoid traversing all OIDs.
It realizes the rapid search and accuracy of monitoring indicators, saves time and development costs, and improves the call efficiency of monitoring equipment.
Smart Images

Figure CN114265750B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data acquisition, and more particularly, to a method, device, electronic device, and computer-readable storage medium for collecting monitoring metrics. Background Art
[0002] The collection methods of monitoring data are divided into default collection, plug-ins, probes, logs, and buried points according to the different sources of monitoring data. The data collector can directly collect relevant operation and maintenance data from the running system, obtain data from the APIs of other systems, or listen for monitoring data from the system or third-party components.
[0003] Current monitoring software can monitor most manufacturers' network devices, such as device ports, device models, version information, etc. Since the Object Identifier (OID) values of these devices are public, the private OID values of many manufacturers have not been published, and no OID descriptions can be found, which brings difficulties to network device performance monitoring. Most engineers can only use tools such as MIB Walk to scan the device OIDs, and then manually analyze and test tens of thousands or even hundreds of thousands of OID values. The workload is huge, and sometimes the scanning tool used is inappropriate, resulting in the inability to scan out the required OID values. Therefore, it consumes a huge amount of time and development costs and has low efficiency. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a method, device, electronic device, and computer-readable storage medium for collecting monitoring metrics, which can directly obtain the corresponding metric information through the OID, saving time and development costs.
[0005] In a first aspect, an embodiment of this application provides a method for collecting monitoring metrics, the method including:
[0006] Obtain the management information base of the monitoring device to be collected;
[0007] Parse the management information base to obtain monitoring metrics;
[0008] Obtain a monitoring database according to the monitoring metrics;
[0009] Obtain the corresponding OID set of the monitoring database;
[0010] Obtain a scheduling task;
[0011] Query the OID set in the monitoring database according to the scheduling task to obtain metric information.
[0012] In the above implementation process, the monitoring database and the OID set are obtained according to the monitoring metrics of the monitoring device and the OIDs corresponding to the monitoring metrics, which facilitates the real-time search for the monitoring metrics and the OIDs, makes the call of the monitoring device more convenient, and saves time and development costs.
[0013] Further, the step of obtaining the monitoring database according to the monitoring metrics includes:
[0014] Obtain the metric source information and metric type information of the monitoring metric;
[0015] Classify the monitoring metrics according to the metric source information and the metric type information to obtain multiple monitoring metric sets;
[0016] Merge the multiple monitoring metric sets to obtain the monitoring database.
[0017] In the above implementation process, classifying the monitoring metrics according to the metric source information and the metric type information facilitates the subsequent search for the monitoring metrics, saves the time for searching the monitoring metrics, and can ensure the accuracy of the found monitoring metrics.
[0018] Further, the step of obtaining the OID set corresponding to the monitoring database includes:
[0019] Obtain the OIDs corresponding to the monitoring metrics in the monitoring database;
[0020] Obtain the OID set according to the OIDs.
[0021] In the above implementation process, the OIDs of the monitoring metrics are uniformly placed in the OID set, which facilitates the subsequent search for the OIDs of the monitoring metrics and avoids the situation where the OIDs corresponding to the monitoring metrics cannot be queried.
[0022] Further, the step of obtaining the OID set according to the OIDs includes:
[0023] Obtain the metric type information of the monitoring metric corresponding to the OID;
[0024] Obtain the OID set according to the OIDs with the metric type information of the monitoring metric.
[0025] In the above implementation process, the metric type information of the monitoring metric is used as the label of the OID, avoiding the cumbersome process of finding the type corresponding to the OID, and can quickly find the OID corresponding to the monitoring metric, saving the search time of the OID.
[0026] Further, the step of querying the OID set in the monitoring database according to the scheduling task to obtain the metric information includes:
[0027] Obtain the task source information and task type information in the scheduling task;
[0028] Find the corresponding monitoring metrics in the monitoring database according to the task source information and the task type information;
[0029] Obtain the metric information according to the monitoring metrics.
[0030] In the above implementation process, by corresponding the task source information and task type information in the scheduling task with those in the monitoring database, the corresponding monitoring metrics can be quickly found, without having to traverse all the monitoring metrics in the monitoring database, thus improving the search speed.
[0031] Further, the step of obtaining the metric information according to the monitoring metrics includes:
[0032] Obtain the OID corresponding to the monitoring metric;
[0033] Obtain the metric information according to the OID.
[0034] In the above implementation process, according to the OID, the corresponding metric information in the scheduling task can be quickly found, without having to traverse each OID in the OID set, and it ensures the complete correspondence between the metric information, the monitoring metric, and the OID.
[0035] Further, the step of obtaining the metric information according to the OID includes:
[0036] Obtain the OID instruction corresponding to the OID according to the OID;
[0037] Send the OID instruction to the server so that the server returns the metric information.
[0038] In the above implementation process, after finding the corresponding OID, obtain the OID instruction corresponding to the OID, and without having to call the monitoring metric again, the metric information corresponding to the monitoring metric can be directly obtained.
[0039] In a second aspect, an embodiment of the present application further provides a monitoring metric acquisition device, and the device includes:
[0040] An acquisition module, configured to acquire the management information base of the monitoring device to be acquired; and is also configured to acquire the scheduling task;
[0041] An analysis module, configured to analyze the management information base to obtain the monitoring metrics;
[0042] An integration module, configured to obtain the monitoring database according to the monitoring metrics;
[0043] An OID set acquisition module, configured to acquire the corresponding OID set of the monitoring database;
[0044] A query module, configured to query the OID set in the monitoring database according to the scheduling task to obtain metric information.
[0045] In the above implementation process, the monitoring database and the OID set are obtained according to the monitoring metrics of the monitoring device and the OIDs corresponding to the monitoring metrics, which facilitates the real-time search for monitoring metrics and OIDs, and makes the invocation of the monitoring device more convenient, saving time and development costs.
[0046] In a third aspect, an electronic device provided by an embodiment of the present application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described in any item of the first aspect are implemented.
[0047] In a fourth aspect, a computer-readable storage medium provided by an embodiment of the present application has operation instructions stored thereon. When the operation instructions are run on a computer, the computer is caused to execute the method described in any item of the first aspect.
[0048] In a fifth aspect, a computer program product provided by an embodiment of the present application, when run on a computer, causes the computer to execute the method described in any item of the first aspect.
[0049] Other features and advantages of the present disclosure will be described in the subsequent description, or, some features and advantages can be inferred from the description or determined without doubt, or can be obtained by implementing the above technologies of the present disclosure.
[0050] And can be implemented according to the content of the description. The following will be described in detail with reference to the preferred embodiments of the present application and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0052] Figure 1 It is a schematic flowchart of the method for collecting monitoring metrics provided by an embodiment of the present application;
[0053] Figure 2 It is a schematic structural composition diagram of the device for collecting monitoring metrics provided by an embodiment of the present application;
[0054] Figure 3 This is a schematic diagram of the structural composition of the electronic device provided by the embodiment of the present application. Specific implementation manners
[0055] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0056] It should be noted that: similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0057] Next, with reference to the accompanying drawings and embodiments, the specific implementation manners of the present application will be further described in detail. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0058] Embodiment 1
[0059] Figure 1 This is a schematic flowchart of the method for collecting monitoring metrics provided by the embodiment of the present application. As Figure 1 shown, the method includes:
[0060] S1. Obtain the management information database of the monitoring device to be collected;
[0061] S2. Parse the management information database to obtain monitoring metrics;
[0062] S3. Obtain the monitoring database according to the monitoring metrics;
[0063] S4. Obtain the corresponding OID set of the monitoring database;
[0064] S5. Obtain the scheduling task;
[0065] S6. Query the OID set in the monitoring database according to the scheduling task to obtain the metric information.
[0066] In the above implementation process, the monitoring database and the OID set are obtained according to the monitoring metrics of the monitoring device and the OIDs corresponding to the monitoring metrics, which facilitates the real-time search of the monitoring metrics and the OIDs, and makes the call of the monitoring device more convenient, saving time and development costs.
[0067] The methods of monitoring metric collection are mainly divided into default collection, plugins, probes, logs, and buried points according to different sources of monitoring data. The data collector is generally a data collection and reporting tool that supports the plugin mechanism. It can directly collect relevant operation and maintenance data from the system it runs on, obtain data from the APIs of other systems, or listen for monitoring data from the system or third-party components.
[0068] The collector determines the source of the monitoring data, and the quality of the collector determines the coverage, data quality, and timeliness of the monitoring data. A good monitoring system should be equipped with a large number of collectors for common technical scenarios and provide convenient custom data interfaces. Monitoring data for standard scenarios accounts for about 70% of all monitoring data. A large number of collectors can greatly reduce the holding cost of the monitoring system. Custom monitoring data accounts for about 30% of all monitoring data. A well-designed custom monitoring data interface can better schedule, organize, and collect custom data sources and lay a solid engineering foundation for subsequent secondary development work.
[0069] The Management Information Base (MIB) is one of the content of the standard frameworks of two network management protocols, the Transmission Control Protocol (TCP) and the Internet Protocol (IP). The MIB defines the data items that managed devices must store, the operations allowed for each data item and their meanings, that is, data variables such as the control and status information of managed devices accessible by the management system are stored in the MIB. It is a database with a numerical structure, and each monitored object is identified by a unique OID.
[0070] Any managed resource can be represented as an object, called a managed object. The MIB is a collection of managed objects. It defines a series of attributes of the managed object: the name of the object, the access rights of the object, and the data type of the object, etc. Exemplarily, the managed object can be a monitoring device.
[0071] Each Simple Network Management Protocol (SNMP) device has its own MIB. The MIB can also be regarded as a bridge between the Network Management System (NMS) and SNMP.
[0072] Optionally, the management end is a JAVA project that integrates SNMP4J.jar, manages the MIB, and performs operations with the agent end through a tool class for SNMP.
[0073] The agent installs the NET-SNMP component for the managed object. Net-SNMP is the most widely deployed SNMP implementation solution in embedded systems and also the best solution. It features stable performance, low consumption of server performance, and simple deployment and implementation.
[0074] Further, S3 includes:
[0075] Obtain the metric source information and metric type information of the monitoring metrics;
[0076] Classify the monitoring metrics according to the metric source information and metric type information to obtain multiple monitoring metric sets;
[0077] Merge the multiple monitoring metric sets to obtain a monitoring database.
[0078] Optionally, the monitoring metric set also includes set information such as set name and set ID, etc.
[0079] In the above implementation process, classifying the monitoring metrics according to the metric source information and metric type information facilitates the subsequent search for monitoring metrics, saves the time for searching for monitoring metrics, and can ensure the accuracy of the found monitoring metrics.
[0080] Further, S4 includes:
[0081] Obtain the OID corresponding to the monitoring metric in the monitoring database;
[0082] Obtain an OID set according to the OID.
[0083] In the above implementation process, uniformly placing the OIDs of the monitoring metrics in the OID set facilitates the subsequent search for the OIDs of the monitoring metrics and avoids the situation where the OID corresponding to the monitoring metric cannot be queried.
[0084] Exemplarily, Table 1 shows the OID set.
[0085] Table 1 Schematic Table of OID Set
[0086] Monitoring metric name OID Storage unit Collection ID Total hard disk size 1.3.6.1.2.1.25.2.3.1.5 KB 1 Used disk size 1.3.6.1.2.1.25.2.3.1.6 KB 1 Disk type 1.3.6.1.2.1.25.2.3.1.2 1 CPU usage rate 1.3.6.1.2.1.25.3.3.1.2 2
[0087] Further, the step of obtaining an OID set according to the OID includes:
[0088] Obtain the metric type information of the monitoring metric corresponding to the OID;
[0089] Obtain an OID set according to the OID with the metric type information of the monitoring metric.
[0090] Exemplarily, Table 2 shows the monitoring metric set.
[0091] Table 2 Schematic Table of Monitoring Index Set
[0092] Collection name Collection tag Source Type Collection ID Hard disk information DISK Tongfang CA2800E 1 CPU information CPU Tongfang CA2800E 2 Hard disk information DISK Maipu NS3320-52 3
[0093] In the above implementation process, the index type information of the monitoring index is used as the label of the OID, avoiding the cumbersome process of finding the type corresponding to the OID, and the OID corresponding to the monitoring index can be quickly found, saving the search time of the OID.
[0094] Further, S6 includes:
[0095] Obtain the task source information and task type information in the scheduling task;
[0096] Find the corresponding monitoring index in the monitoring database according to the task source information and task type information;
[0097] Obtain the index information according to the monitoring index.
[0098] In the above implementation process, the task source information and task type information in the scheduling task are corresponding to those in the monitoring database, and the corresponding monitoring index can be quickly found without traversing all the monitoring indexes in the monitoring database, improving the search speed.
[0099] Further, the step of obtaining the index information according to the monitoring index includes:
[0100] Obtain the OID corresponding to the monitoring index;
[0101] Obtain the index information according to the OID.
[0102] In the above implementation process, the corresponding index information in the scheduling task can be quickly found according to the OID without traversing each OID in the OID set, and the complete correspondence between the index information, the monitoring index and the OID is ensured.
[0103] Exemplarily, as shown in Table 3 is the index information.
[0104] Table 3 Schematic Table of Index Information
[0105] Monitoring device IP Source Type SNMP version SNMP port 192.16.1.2 Tongfang CA2800E 1 161
[0106] Further, the step of obtaining the index information according to the OID includes:
[0107] Obtain the OID instruction corresponding to the OID according to the OID;
[0108] Send the OID instruction to the server so that the server returns the index information.
[0109] In the above implementation process, after finding the corresponding OID, the OID instruction corresponding to the OID is obtained, and there is no need to call the monitoring metrics anymore. The metric information corresponding to the monitoring metrics can be directly obtained.
[0110] One collector is deployed in one isolation domain. Optionally, the collector is an NMS, which is scheduled through a scheduling task. The IP of the managed object is input, and a monitoring request is sent to the managed physical machine through the SNMP protocol. The managed object is polled for collection. One monitoring metric corresponds to one OID. Sending an OID instruction once can obtain the data corresponding to the metric once. For example, sending an OID instruction for the total disk size can obtain the total disk size data, and sending an OID instruction for the CPU utilization rate can obtain the CPU utilization rate data.
[0111] Embodiment 2
[0112] In order to execute the method corresponding to the above Embodiment 1 to achieve the corresponding functions and technical effects, the following provides a collection device for monitoring metrics, as Figure 2 shown. The device includes:
[0113] An acquisition module 1, configured to acquire the management information base of the monitoring device to be acquired; and also configured to acquire a scheduling task;
[0114] An analysis module 2, configured to analyze the management information base to obtain monitoring metrics;
[0115] An integration module 3, configured to obtain a monitoring database according to the monitoring metrics;
[0116] An OID set acquisition module 4, configured to acquire the OID set corresponding to the monitoring database;
[0117] A query module 5, configured to query the OID set in the monitoring database according to the scheduling task to obtain metric information.
[0118] In the above implementation process, obtaining the monitoring database and the OID set according to the monitoring metrics of the monitoring device and the OIDs corresponding to the monitoring metrics facilitates the real-time search of the monitoring metrics and the OIDs, and makes the call of the monitoring device more convenient, saving time and development costs.
[0119] Further, the integration module 3 is further configured to:
[0120] Obtain the metric source information and metric type information of the monitoring metrics;
[0121] Classify the monitoring metrics according to the metric source information and the metric type information to obtain multiple monitoring metric sets;
[0122] Merge the multiple monitoring metric sets to obtain a monitoring database.
[0123] In the above implementation process, the monitoring metrics are classified according to the metric source information and metric type information, which facilitates the subsequent search for monitoring metrics, saves the time for searching monitoring metrics, and can ensure the accuracy of the found monitoring metrics.
[0124] Further, the OID set obtaining module 4 is further configured to:
[0125] Obtain the OIDs corresponding to the monitoring metrics in the monitoring database;
[0126] Obtain an OID set according to the OIDs.
[0127] In the above implementation process, the OIDs of the monitoring metrics are uniformly placed in the OID set, which facilitates the subsequent search for the OIDs of the monitoring metrics and avoids the situation where the OID corresponding to the monitoring metric cannot be queried.
[0128] Further, the OID set obtaining module 4 is further configured to:
[0129] Obtain the metric type information of the monitoring metric corresponding to the OID;
[0130] Obtain an OID set according to the OIDs with the metric type information of the monitoring metrics.
[0131] In the above implementation process, the metric type information of the monitoring metric is used as the label of the OID, avoiding the cumbersome process of finding the type corresponding to the OID, and can quickly find the OID corresponding to the monitoring metric, saving the search time of the OID.
[0132] Further, the query module 5 is further configured to:
[0133] Obtain the task source information and task type information in the scheduling task;
[0134] Search for the corresponding monitoring metrics in the monitoring database according to the task source information and task type information;
[0135] Obtain metric information according to the monitoring metrics.
[0136] In the above implementation process, the task source information and task type information in the scheduling task are made to correspond to those in the monitoring database, so that the corresponding monitoring metrics can be quickly found without traversing all the monitoring metrics in the monitoring database, improving the search speed.
[0137] Further, the query module 5 is further configured to:
[0138] Obtain the OID corresponding to the monitoring metric;
[0139] Obtain metric information according to the OID;
[0140] Obtain the OID instruction corresponding to the OID according to the OID;
[0141] Send the OID instruction to the server so that the server returns the metric information.
[0142] In the above implementation process, according to the OID, the corresponding metric information in the scheduling task can be quickly found without traversing each OID in the OID set, and the complete correspondence between the metric information, the monitoring metrics, and the OID is ensured. After finding the corresponding OID, obtain the OID instruction corresponding to the OID, and without calling the monitoring metrics again, the metric information corresponding to the monitoring metrics can be directly obtained.
[0143] The above-mentioned acquisition device for monitoring metrics can implement the method of the first embodiment. The optional items in the first embodiment are also applicable to this embodiment and will not be elaborated here.
[0144] The remaining content of the embodiments of the present application can refer to the content of the first embodiment and will not be elaborated in this embodiment.
[0145] Embodiment Three
[0146] The embodiment of the present application provides an electronic device, including a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for collecting monitoring metrics in the first embodiment.
[0147] Optionally, the above-mentioned electronic device can be a server.
[0148] Please refer to Figure 3 , Figure 3 , which is a schematic diagram of the structural composition of the electronic device provided by the embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. Among them, the communication bus 34 is used to realize the direct connection and communication of these components. Among them, the communication interface 32 of the device in the embodiment of the present application is used to communicate with other node devices for signaling or data. The processor 31 may be an integrated circuit chip with signal processing capabilities.
[0149] The above-mentioned processor 31 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor 31 may also be any conventional processor, etc.
[0150] The memory 33 can be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Computer-readable operation instructions are stored in the memory 33. When the computer-readable operation instructions are executed by the processor 31, the device can execute each of the steps involved in the above Figure 1 method embodiments.
[0151] Optionally, the electronic device may further include a storage controller and an input / output unit. Each of the memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected directly or indirectly to each other to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses 34. The processor 31 is used to execute the executable modules stored in the memory 33, such as software function modules or computer programs included in the device.
[0152] The input / output unit is used to provide the user with the creation of tasks and the creation of an optional start time period or a preset execution time for the task to achieve the interaction between the user and the server. The input / output unit can be, but is not limited to, a mouse, a keyboard, etc.
[0153] It can be understood that Figure 3 the structure shown is only schematic, and the electronic device may further include more or fewer components than those shown in Figure 3 or have a different configuration from that shown in Figure 3 shown. Figure 3 Each of the components shown in can be implemented by hardware, software, or a combination thereof.
[0154] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method for collecting monitoring metrics in Embodiment 1.
[0155] An embodiment of the present application further provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the method described in the method embodiment.
[0156] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable operation instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer operation instructions.
[0157] In addition, in each embodiment of the present application, the functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0158] If the above functions are implemented in the form of software functional modules and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several operation instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs, etc., which can store program codes.
[0159] The above description is only for the embodiments of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0160] As described above, this is only the specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0161] It should be noted that, in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the said element.
Claims
1. A method for collecting monitoring metrics, characterized in that, The method includes: Obtaining the management information base of the monitoring device to be collected; Parsing the management information base to obtain monitoring metrics; Obtaining a monitoring database according to the monitoring metrics; Obtaining the corresponding OID set of the monitoring database; Obtaining a scheduling task; Querying the OID set in the monitoring database according to the scheduling task to obtain metric information; The step of obtaining a monitoring database according to the monitoring metrics includes: Obtaining the metric source information and metric type information of the monitoring metrics; Classifying the monitoring metrics according to the metric source information and the metric type information to obtain multiple monitoring metric sets; Merging the multiple monitoring metric sets to obtain the monitoring database; The step of querying the OID set in the monitoring database according to the scheduling task to obtain metric information includes: Obtaining the task source information and task type information in the scheduling task; Searching for the corresponding monitoring metrics in the monitoring database according to the task source information and the task type information; Obtaining the metric information according to the monitoring metrics; The step of obtaining the metric information according to the monitoring metrics includes: Obtaining the OID corresponding to the monitoring metric; Obtaining the metric information according to the OID; The step of obtaining the metric information according to the OID includes: Obtaining the OID instruction corresponding to the OID according to the OID; Sending the OID instruction to the server so that the server returns the metric information.
2. The acquisition method of the monitoring index according to claim 1, characterized in that, The step of obtaining the corresponding OID set of the monitoring database includes: Obtaining the OID corresponding to the monitoring metric in the monitoring database; Obtaining the OID set according to the OID.
3. The acquisition method of the monitoring index according to claim 2, wherein, The step of obtaining the OID set according to the OID includes: Obtaining the metric type information of the monitoring metric corresponding to the OID; Obtaining the OID set according to the OID with the metric type information of the monitoring metric.
4. A collection device for monitoring indicators, characterized in that, The device includes: An obtaining module, configured to obtain the management information base of the monitoring device to be collected; and also configured to obtain a scheduling task; A parsing module, configured to parse the management information base to obtain monitoring metrics; An integration module, configured to obtain a monitoring database according to the monitoring metrics; An OID set obtaining module, configured to obtain the corresponding OID set of the monitoring database; A querying module, configured to query the OID set in the monitoring database according to a scheduling task to obtain metric information; The integration module is further configured to: Obtain the metric source information and metric type information of the monitoring metrics; Classify the monitoring metrics according to the metric source information and the metric type information to obtain multiple monitoring metric sets; Merge the multiple monitoring metric sets to obtain the monitoring database; The querying module is further configured to: Obtain the task source information and task type information in the scheduling task; Search for the corresponding monitoring metrics in the monitoring database according to the task source information and the task type information; Obtain the metric information according to the monitoring metrics; Obtain the OID corresponding to the monitoring metric; Obtain the metric information according to the OID; Obtain the OID instruction corresponding to the OID according to the said OID; Send the OID instruction to the server so that the server returns the metric information.
5. An electronic device, characterized in that, It includes a memory and a processor. The memory is used to store a computer program, and the processor runs the computer program so that the electronic device executes the method for collecting monitoring metrics according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, it implements the method for collecting monitoring metrics according to any one of claims 1 to 3.
Citation Information
Patent Citations
Equipment monitoring method, device and equipment
CN110569164A
Performance index data acquisition method and device
CN112152824A