Method for automatically discovering and managing related information of CMDB equipment based on JAVA program and electronic equipment
Through the automatic discovery management method of CMDB equipment based on JAVA program, and using multiple acquisition methods and information filtering technologies, the problems of high operation and maintenance costs and poor data accuracy caused by manual entry in CMDB equipment management are solved, and automated management and efficient data are realized Updated to improve the management efficiency and accuracy of CMDB system.
Patent Information
- Application Number
- CN202411310928.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-13
Smart Images

Figure CN119135526A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing and analysis, and in particular to a method and electronic device for automatically discovering and managing CMDB equipment related information based on a JAVA program. Background Art
[0002] With the continuous development of the IT industry, a large number of systems, programs, and middleware are continuously deployed online. The demand for IT servers used to carry these businesses is increasing. A cluster may have hundreds or thousands of servers, and multiple cluster servers in enterprises are not uncommon. Due to the huge number of devices, in order to manage the information on the devices, a CMDB (Configuration Management DataBase) management system is a very necessary requirement. CMDB is a database specifically used to store and manage IT infrastructure components and their relationships in an organization.
[0003] In various enterprises, the management of CMDB is basically based on a traditional manual entry method: the operation and maintenance personnel manually maintain the equipment list. The operation and maintenance personnel often use automated operation and maintenance tools to manually log in to the server to obtain the information that needs to be entered into the CMDB, and then enter it into the system in a unified manner after simple manual processing.
[0004] If we continue to use traditional operation and maintenance methods to manage server information, there will be the following problems: (1) It requires huge amounts of maintenance manpower, and maintenance personnel need to have sufficient professional knowledge, but there is a lack of automation.
[0005] (2) The timeliness of data is poor. For example, the information of many instances in the server is changing, and it is often impossible to quickly update and iterate the specific information on the server manually.
[0006] (3) The accuracy of data is poor, and manual entry of information is often accompanied by operational errors.
[0007] To solve the above problems, the present application proposes a method for automatic discovery and management of CMDB equipment-related information based on JAVA program to improve management efficiency and the timeliness and accuracy of data. Summary of the invention
[0008] In order to solve the problems existing in the above background technology, the present invention proposes a method and electronic device for automatically discovering and managing CMDB device related information based on JAVA program, so as to improve management efficiency and timeliness and accuracy of data. Specifically, the present invention adopts the following technical solutions: This application provides a method for automatically discovering and managing CMDB device-related information based on a JAVA program. The steps include: S1. Collection scheduling management settings; S2. Distribute the collected information in batches to multiple devices for collection, and generate collection results, wherein the collection method is an information collection method for multiple types of devices, and the information collection method includes zabbix agent collection and SSH collection; wherein SSH collection includes: Use the sshj connection pool to connect to the monitoring device and create a connection terminal; After creating the connection terminal, configure the parameters and adapt the SSH connection to different devices; S3, analyzing the collected results; S4. After parsing the collected results, the information is called back to the CMDB system to update the CMDB system.
[0009] As a preferred solution of this application, after creating the connection terminal, the parameters are configured, including setting the SSH PTY related configuration, which specifically includes the following steps: Log in to the remote server via SSH, assigning a PTY to each SSH session; Depending on the server configuration, when it is detected that PTY is disabled on some devices, a pseudo terminal is forcibly created.
[0010] As a preferred solution of the present application, after creating the connection terminal, the parameters are configured, which also includes: configuring the use of public key method to log in to the collection and configuring to reuse the session connection.
[0011] As a preferred solution of this application, step S1 includes: The administrator of the device sets the update frequency range and the server object range to be managed by the scheduled task management program for the information task items that need to be updated and discovered on the configuration information page; Add the task of updating information to the task queue, and calculate the time when the information needs to be updated next time based on the time of the last update and the frequency of the update; The scheduling information for each time is stored, and when a task with the time to update the field information is scanned, a corresponding collection task is generated; Execute the collection task, obtain relevant information of the field through different collection methods, and update it back to the ledger information of the CMDB.
[0012] As a preferred solution of the present application, step S1 also includes: specifying a corresponding default scheduling period according to the average execution time required for executing the acquisition script and the average performance consumption of the device and the update requirements of the field information.
[0013] As a preferred solution of the present application, step S1 also includes: when the scheduling fails, the failed task is re-added to the retry scheduling queue, and the error information of the scheduling failure is recorded for manual troubleshooting by the operation and maintenance personnel. At the same time, the failed task will continue to be executed until the task scheduling is successful or a certain number of retries is reached.
[0014] As a preferred solution of this application, step S3 includes: Formulate corresponding analysis methods according to different collected information; Information filtering and screening is performed through regular expressions and error enumeration.
[0015] As a preferred solution of the present application, the corresponding analysis method is formulated according to different collected information, including: Filter keywords through scripts to obtain relevant process information; The process information is transmitted to the program, and the program parses the format information of the process according to the corresponding rules; According to the format information of the process, it is determined whether the process meets the requirements, and then the parsing is completed.
[0016] As a preferred solution of the present application, step S4 includes the following steps: S41. Update the data of each discovery indicator in the device according to the unique identifier of the device; S42. Filter the data with obvious format problems; S43. Audit the existing data that has changed and provide relevant batch audit operations; S44: Automatically associate related device information based on the collected information and update it.
[0017] The present application also provides an electronic device, including a processor, a memory, an input device and an output device coupled to each other; wherein the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method for automatic discovery and management of CMDB device-related information based on a JAVA program as described above.
[0018] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention collects scheduling management settings and uses a timed scheduling task management program to support users in configuring scheduling cycles, which can better adjust the data update cycle and no longer rely too much on a large number of manpower. Only a small number of operation and maintenance personnel or management personnel are needed to handle a small number of abnormal devices, which greatly saves operation and maintenance management costs and greatly provides the automation capability of CMDB management.
[0019] (2) The collection method provided by the present invention obtains data in a manner that is compatible with multiple network protocols, such as agent or ssh, and can obtain device information in batches, thereby improving the timeliness and accuracy of data, thereby ensuring the health of the user's equipment and further realizing accurate CMDB system information management.
[0020] (3) The present invention performs information filtering and screening by means of regular expressions and error enumeration, which not only filters out invalid information, but also ensures that erroneous information does not affect the existing input information, thereby further improving the timeliness and accuracy of data.
[0021] (4) The present invention calls back the collected, scheduled and parsed information to the CMDB system and updates the CMDB to prevent different types of devices from being unable to accurately obtain data. The present invention has strong expansion capabilities and further improves the automation capabilities of the CMDB system information management. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flowchart of a method for automatically discovering and managing CMDB device-related information based on a JAVA program according to an embodiment of the present invention; Figure 2 A schematic diagram of the process of SSH collection according to an embodiment of the present invention; Figure 3 Schematic diagram of the process of step S1 of an embodiment of the present invention; Figure 4 Schematic diagram of the process of step S4 of an embodiment of the present invention; Figure 5 A schematic structural diagram of an electronic device according to another embodiment of the present invention; DETAILED DESCRIPTION The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. It should be noted that 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 such actual relationship or order between these entities or operations.
[0024] The present invention provides a method and electronic device for automatically discovering and managing CMDB device-related information based on a JAVA program. By using a JAVA program to obtain relevant information in a device and automatically managing the device information in a CMDB system, the above problems can be solved. In addition to being able to obtain device information in batches, the data update cycle can be better adjusted, and it has good scalability to prevent different types of devices from being unable to accurately obtain data. For example, the JAVA program can obtain relevant information about the device based on different network protocols, such as executing a shell script command through the SSH protocol to obtain the basic underlying information of the device. The program then performs targeted processing based on the obtained information data, and after obtaining the desired information, it is entered into the CMDB management system according to different businesses, and automatic management is achieved.
[0025] The specific implementation process of the present invention will be described in detail below.
[0026] Embodiment 1 In order to achieve the above-mentioned object, the present invention provides a method for automatically discovering and managing CMDB device-related information based on a JAVA program, which includes information collection and data analysis adapted to various types of devices, such as Figure 1 As shown, the method comprises the following steps: S1. Collection scheduling management settings: In the management information of the CMDB account, much server information is manually entered and managed. In order to manage these data that may change at any time, operation and maintenance manpower must be invested for a long time to update the account information irregularly. In order to solve this problem, the present invention provides a timed scheduling task management program that replaces manpower, that is, the collection scheduling management setting of the present invention, which supports users to configure the scheduling cycle, such as Figure 3 As shown, the specific steps include: S11, the administrator of the device sets the update frequency range and the server object range to be managed by the scheduled task management program for the information task items that need to be updated on the configuration information page. The update frequency range may be the 1st of each month, every 5 minutes, etc.
[0027] S12: Add the task of updating information to the task queue, and calculate the time when the information needs to be updated next time according to the time of the last update and the frequency of the required updates.
[0028] S13. Store each scheduling information, and when a task that reaches the time to update field information is scanned, generate a corresponding collection task.
[0029] S14. Execute the collection task, obtain relevant information of the field through different collection methods, and update it back to the ledger information of CMDB.
[0030] In a preferred embodiment of the present invention, the acquisition scheduling management setting, in order to further improve the convenience of user use, in addition to supporting the user to configure the scheduling period, also includes: Step S15: specify a corresponding default scheduling period according to the average execution time required for executing the acquisition script, the average performance consumption of the device, and the update requirements of the field information, so that users can use the present invention more conveniently and quickly.
[0031] In a preferred embodiment of the present invention, the present invention also takes into account the uncontrollable scheduling failure generated during a certain collection execution. If the scheduling cycle is set to be long, the real-time and accuracy of the ledger information will be greatly affected. Therefore, it also includes: Step S16, when the scheduling fails, the failed task is added back to the retry scheduling queue, and the error information of the scheduling failure is recorded for manual troubleshooting by the operation and maintenance personnel. At the same time, the failed task will continue to execute until the task scheduling is successful or a certain number of retries is reached. The present invention collects scheduling management settings and uses the timed scheduling task management program to support users to configure the scheduling cycle, which can better adjust the data update cycle, no longer overly rely on a large number of manpower, and only requires a small number of operation and maintenance personnel or management personnel to handle a small number of abnormal devices, which greatly saves the operation and maintenance management costs, and greatly provides the automation capability of CMDB management.
[0032] S2. Batch distribute the collected information to multiple devices for collection and generate collection results. The collection method is a method for collecting information of multiple types of devices, including but not limited to server information collection, out-of-band device information collection, Mysql, Oracle and Sysbase database collection, etc.
[0033] Among them, the information collection method includes two methods: zabbix agent collection and SSH collection. In the following specific embodiments, the information collection method is described by taking server information collection as an example. It can be understood that it is also applicable to other devices. Here, only server information collection is taken as an example, but it is not a limitation of the present invention.
[0034] Zabbix agent (Zabbix client) collection method is a monitoring form of Zabbix monitoring. Zabbix is an enterprise-level open source monitoring solution that provides distributed system monitoring and network monitoring functions. Zabbix agent is one of the collection methods provided by Zabbix. Zabbix mainly consists of two parts, Zabbix server and optional component Zabbix agent. The specific process of using Zabbix agent to collect server information includes: Install zabbix agent on the monitored host and set relevant collection parameters; Zabbix agent regularly collects various data according to the relevant collection parameters set, and sends them to the Zabbix server; After receiving the data, the zabbix server stores the data in the database; Zabbix web displays and draws on the front end based on the data stored in the database.
[0035] Among them, zabbix agent regularly collects various data including active mode and passive mode according to the relevant collection parameters set: The active mode is as follows: the agent requests the server to obtain the list of active monitoring items, and actively submits the data that needs to be detected in the monitoring items to the server / proxy.
[0036] The specific passive mode is: the server requests the agent to obtain the data of the monitored item, and the agent returns the data.
[0037] In a preferred embodiment of the present invention, zabbix agent uses passive mode to regularly collect various data. When the present invention uses zabbix agent in passive mode, the program actively calls the collection, which can bias the performance pressure required for collection to the scheduling program, reducing the impact of the collection device on the business when collecting.
[0038] The SSH collection method refers to logging into the device through the SSH (Secure Shell) protocol and using the pseudo terminal provided by it to execute related collection script commands. The SSH protocol is a network security protocol that requires encryption and authentication for remote access and file transfer. The SSH function is similar to the Telnet service, but the encryption and authentication features of SSH can provide users with a more powerful security mechanism. When users log in to the device in an insecure network environment, SSH can effectively protect the device from attacks such as IP address fraud and plain text password interception. There are currently two versions of the SSH protocol, SSHv1 and SSHv2, which are incompatible with each other. Compared with SSHv1, SSHv2 can provide higher performance and security. Since SSH collection based on the zabbix middleware only supports SSHv1 login collection, it has low adaptability to public key identity authentication login and a cumbersome configuration process, making it difficult to popularize to most devices in the CMDB system. Therefore, the SSH acquisition method of the present invention adopts a JAVA acquisition program that supports both SSHv1 and SSHv2 versions of the connection, namely sshj. sshj is an open source JAVA library that is specifically used to achieve secure communication with the server through the SSH protocol. sshj supports two SSH protocol versions, namely SSHv1 and SSHv2, which makes it compatible with different devices and systems. Figure 2 As shown, the SSH collection method includes: Use the sshj connection pool to connect to the monitoring device and create a connection terminal; After creating the connection terminal, configure the parameters to adapt to devices with different SSH connection configurations and reduce the problem of failure to collect information due to connection configuration problems. The configuration of parameters after creating the connection terminal includes but is not limited to the following: 1) Set up SSH PTY related configuration: PTY is short for pseudo terminal, which provides a terminal device simulation in UNIX and UNIX-like systems (such as Linux). The pseudo terminal consists of a master device (PTY Master, referred to as PTM) and a slave device (PTY Slave, referred to as PTS). The communication between them is just like the communication through a real terminal. Setting up SSH PTY related configuration includes the following steps: S101. Log in to the remote server via SSH and assign a PTY to each SSH session so that commands and programs can be run interactively, for example, to run a text editor or other programs that require terminal interaction.
[0039] S102. According to the configuration of the server, when it is detected that some devices disable PTY, a command similar to ssh-t is used to forcibly create a pseudo terminal. When it is detected that some devices disable PTY, if an ssh connection terminal for creating PTY is used, Failed Requesting PTY will appear, that is, an error of failure to create PTY will appear. For this reason, an embodiment of the present invention uses a command similar to ssh-t to forcibly create a pseudo terminal, that is, when it is found that the device disables PTY, a configuration that does not create PTY can be used for collection, but a command similar to ssh-t is used to forcibly create a pseudo terminal.
[0040] 2) Configure the public key to log in to the collection: Using key login can improve the security of SSH because it prevents malicious users from trying to guess passwords using brute force techniques. This method provides an additional way for users who do not want to provide account and password information to manage devices.
[0041] 3) Configure to reuse session connections: In the SSH monitoring items natively developed by the zabbix middleware, there is a problem that has a great impact on the device: when a monitoring device needs to collect multiple information through the SSH monitoring items of the zabbix middleware, it is necessary to create multiple ssh monitoring item tasks in the zabbix configuration. When zabbix is scheduled, each monitoring item task will create an independent SSH connection with the peer device, which will occupy the device's connection resources during the script execution. If the script execution time is long enough and there are enough SSH monitoring items, the device's thread resources, CPU, memory and other states, and the number of SSH connections may reach an unhealthy state. As a result, in addition to being unable to obtain collected data, it is more likely to affect the device's business.
[0042] In order to solve this problem, the present invention reuses session connections and persists the created SSH connection for a period of time. During this period, if there are tasks with the same SSH connection client that need to be executed, the same SSH connection is shared. At the same time, an SSH connection pool is created to manage the total number of connections of the device to prevent a large number of collection tasks from being performed in large quantities, at one time, and at the same time, thereby ensuring the health of the user's device.
[0043] The collection method provided by the present invention obtains data in a manner compatible with multiple network protocols, such as agent or ssh, and can obtain device information in batches, thereby improving the timeliness and accuracy of data, thereby ensuring the health of user equipment and further realizing accurate CMDB system information management.
[0044] S3. Analyze the collected results, which specifically includes the following process: S31. Formulate corresponding analysis methods according to different collected information: Most of the collection tasks are implemented by executing commands or scripts. When executing relevant commands or scripts, only a series of text information can be obtained. If these text data are not processed, they cannot be entered into the ledger information. The present invention customizes corresponding analysis methods for different collected information, including: Filter keywords through scripts to obtain relevant process information; The process information is transmitted to the program, and the program parses the format information of the process according to the corresponding rules; According to the format information of the process, it is determined whether the process meets the requirements, and then the parsing is completed.
[0045] Example: To determine whether there is an hbase instance in the server, we first use the script to filter keywords, such as ps and grep commands to obtain relevant process information of the hbase keyword, and transmit the information to the program. The program determines the format information of the process according to the corresponding rules. For example, hbase is a java process, and its process format often conforms to the startup command format of the java process, that is, it is started by starting the main force to check whether the port information conforms to the hbase process. If it conforms, it is determined that an hbase instance exists.
[0046] S32. Information filtering and screening is performed by regular expressions and error enumeration. The information that we need to collect is filtered out, and invalid information is filtered out to ensure that the wrong information does not affect the existing input information.
[0047] And because different devices have different device environments, the returned results may often contain some unexpected information, and if this information is carefully observed, it may not affect the correctness of the information, but too much useless information will have a certain impact on the efficiency and results of the screening when filtering and screening information. Therefore, the present invention summarizes most of the common and useless information through sufficient research, and filters out the part of the information we need to collect through regular expressions and error enumeration. For example, in telecommunications services, in order to obtain the device serial number, a large number of devices cannot obtain the serial number and will return the information "Not Specified", which means that the serial number information cannot be identified. Such information enumeration will be added to the information library of the invention. When collecting device serial number information, if "NotSpecified" is found, the information will be filtered; such situations often have device login prompts, Warning and other keywords. We will continuously update the inventory of these problem information with the iteration of the version.
[0048] In addition to filtering invalid information, we also need to ensure that erroneous information does not affect the existing input information. Similarly, after a lot of research, this method uses regular expressions and enumeration to make special processing for erroneous results, and will not overwrite the original CMDB information with erroneous results. The present invention uses regular expressions and error enumeration to perform information filtering and screening, which not only filters out invalid information, but also ensures that erroneous information does not affect the existing input information, further improving the timeliness and accuracy of data.
[0049] S4. After parsing the collected results, the information is called back to the CMDB system to update the CMDB system; like Figure 4 As shown in the figure, when the collection scheduling setting is completed, the collection result data is obtained and parsed through the collection method, a copy of the parsed result data is pushed to the CMDB system, and the following process is completed: S41. Update the data of each discovery indicator in the device according to the unique identifier of the device.
[0050] S42. Filter data with obvious format problems, such as data fields that are too long or numeric character types that do not match, to initially prevent the CMDB ledger of the original correct information from being polluted due to abnormal situations.
[0051] S43. Audit the existing data that has changed, and provide relevant batch audit operations to once again ensure the correctness of the data.
[0052] S44, automatically associate related device information according to the collected information and update it. For example, for the middleware service in the server, it can be determined whether there is a corresponding middleware instance according to the relevant process name and process ID. When the instance is found, it is determined whether there is a related instance ledger in the CMDB. If not, the related ledger information is initialized to form topology management.
[0053] The present invention calls back the collected, scheduled and parsed information to the CMDB system and updates the CMDB to prevent different types of equipment from being unable to accurately obtain data. The invention has strong expansion capability and further improves the automation capability of CMDB system information management.
[0054] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention collects scheduling management settings and uses a timed scheduling task management program to support users in configuring scheduling cycles, which can better adjust the data update cycle and no longer rely too much on a large number of manpower. Only a small number of operation and maintenance personnel or management personnel are needed to handle a small number of abnormal devices, which greatly saves operation and maintenance management costs and greatly provides the automation capability of CMDB management.
[0055] (2) The collection method provided by the present invention obtains data in a manner that is compatible with multiple network protocols, such as agent or ssh, and can obtain device information in batches, thereby improving the timeliness and accuracy of data, thereby ensuring the health of the user's equipment and further realizing accurate CMDB system information management.
[0056] (3) The present invention performs information filtering and screening by means of regular expressions and error enumeration, which not only filters out invalid information, but also ensures that erroneous information does not affect the existing input information, thereby further improving the timeliness and accuracy of data.
[0057] (4) The present invention calls back the collected, scheduled and parsed information to the CMDB system and updates the CMDB to prevent different types of devices from being unable to accurately obtain data. The present invention has strong expansion capabilities and further improves the automation capabilities of the CMDB system information management.
[0058] Embodiment 2 like Figure 5 As shown, the present invention also provides an electronic device 2, including a processor 21 and a memory 22, the memory 22 is used to store computer program code, the computer program code includes computer instructions, when the processor 21 executes the computer instructions, the electronic device executes a method for automatic discovery and management of CMDB device related information based on a JAVA program in the above embodiment.
[0059] The electronic device 2 also includes an input device 24 and an output device 23. The processor 21, the memory 22, the input device 24 and the output device 23 are coupled via a connector, and the connector includes various interfaces, transmission lines or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0060] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present invention.
[0061] The memory 22 can be used to store computer program instructions and various computer program codes including program codes for executing the scheme of the present invention. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.
[0062] The input device 24 is used to input data and / or signals, and the output device 23 is used to output data and / or signals. The output device 23 and the input device 24 can be independent devices or an integrated device.
[0063] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for automatically discovering and managing CMDB equipment-related information based on JAVA program. Features: The steps include: S1. Collection scheduling management settings; S2. Distribute the collected information in batches to multiple devices for collection, and generate collection results, wherein the collection method is an information collection method for multiple types of devices, and the information collection method includes zabbix agent collection and SSH collection; wherein SSH collection includes: Use the sshj connection pool to connect to the monitoring device and create a connection terminal; After creating the connection terminal, configure the parameters and adapt the SSH connection to different devices; S3, analyzing the collected results; S4. After parsing the collected results, the information is called back to the CMDB system to update the CMDB system.
2. According to claim 1, a method for automatically discovering and managing CMDB device-related information based on a JAVA program, Features: After creating the connection terminal, configure the parameters, including setting SSH PTY related configurations. The specific steps include the following: Log in to the remote server via SSH, assigning a PTY to each SSH session; Depending on the server configuration, when it is detected that PTY is disabled on some devices, a pseudo terminal is forcibly created.
3. According to claim 2, a method for automatically discovering and managing CMDB device-related information based on a JAVA program, Features: After creating the connection terminal, the parameters are configured, including: configuring the use of public key mode to log in to the collection and configuring the multiplexing session connection.
4. The method for automatically discovering and managing CMDB equipment related information based on JAVA program according to claim 1, Features: The step S1 comprises: The administrator of the device sets the update frequency range and the server object range to be managed by the scheduled task management program for the information task items that need to be updated and discovered on the configuration information page; Add the task of updating information to the task queue, and calculate the time when the information needs to be updated next time based on the time of the last update and the frequency of the update; The scheduling information for each time is stored, and when a task with the time to update the field information is scanned, a corresponding collection task is generated; Execute the collection task, obtain relevant information of the field through different collection methods, and update it back to the ledger information of the CMDB.
5. The method for automatically discovering and managing CMDB equipment-related information based on a JAVA program according to claim 4, Features: The step S1 also includes: specifying a corresponding default scheduling period according to the average execution time required for executing the acquisition script, the average performance consumption of the device, and the update requirements of the field information.
6. The method for automatically discovering and managing CMDB equipment-related information based on a JAVA program according to claim 5, Features: The step S1 also includes: when the scheduling fails, the failed task is re-added to the retry scheduling queue, and the error information of the scheduling failure is recorded for manual troubleshooting by the operation and maintenance personnel. At the same time, the failed task will continue to be executed until the task scheduling is successful or a certain number of retries is reached.
7. The method for automatically discovering and managing CMDB equipment-related information based on a JAVA program according to claim 1, Features: The step S3 comprises: Formulate corresponding analysis methods according to different collected information; Information filtering and screening is performed through regular expressions and error enumeration.
8. The method for automatically discovering and managing CMDB equipment-related information based on a JAVA program according to claim 7, Features: The corresponding analysis method is formulated according to different collected information, including: Filter keywords through scripts to obtain relevant process information; The process information is transmitted to the program, and the program parses the format information of the process according to the corresponding rules; According to the format information of the process, it is determined whether the process meets the requirements, and then the parsing is completed.
9. The method for automatically discovering and managing CMDB equipment-related information based on a JAVA program according to claim 1, Features: The step S4 comprises the following steps: S41. Update the data of each discovery indicator in the device according to the unique identifier of the device; S42. Filter the data with obvious format problems; S43. Audit the existing data that has changed and provide relevant batch audit operations; S44: Automatically associate related device information based on the collected information and update it.
10. An electronic device, Features: It includes a processor, a memory, an input device and an output device coupled to each other; wherein the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes a method for automatic discovery and management of CMDB device related information based on a JAVA program as described in any one of claims 1-9.
