Server protocol configuration method and device, computer equipment and storage medium
By serializing and extracting server protocol configuration information, combining the target protocol configuration space status, and generating and executing configuration requests, the problem of overwriting SNMP Trap configuration information in large-scale server clusters is solved, and the accuracy and reliability of configuration is improved.
Patent Information
- Application Number
- CN202411734273.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In large-scale server clusters, when using multiple sets of server management software to configure SNMP Trap, configuration information is easily overwritten, resulting in reduced server system performance.
By obtaining the initial protocol configuration information and the expected protocol configuration information, serialize it into the target format, extracting data, determining the protocol configuration method based on the target protocol configuration space state information, generating configuration requests and executing configuration, and finally verifying the configuration result.
Improve the accuracy of protocol configuration, prevent misunderstanding of existing protocol configurations, and verify the configuration results, improving the reliability of server protocol configuration.
Smart Images

Figure CN119629050A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server protocol configuration, and in particular to a server protocol configuration method, apparatus, computer equipment and storage medium. Background Art
[0002] With the widespread application of information technology in various industries, servers, as one of the important infrastructures, are increasingly used in enterprises and organizations. In order to better monitor the health status of servers, it is usually necessary to configure SNMP Trap (SNMP protocol) in the server BMC to quickly report faults through SNMP Trap. Therefore, it has become a trend to manage and configure server BMC in batches through server management software.
[0003] However, in the related art, when using server management software to configure the BMC of the server, the same template is used to configure fixed parameters for the same model of machine. For large-scale server clusters, more than one set of server management software is used. There may be multiple sets of server management software managing a server cluster at the same time. Each server management software needs to perform SNMP Trap configuration to detect the server status through SNMP Trap. Therefore, when performing batch SNMP Trap configuration, the configuration information may be overwritten by other server management software, resulting in reduced server system performance. Summary of the invention
[0004] Based on this, it is necessary to provide a server protocol configuration method, device, computer equipment and storage medium that can improve server reliability in response to the above technical problems.
[0005] In order to solve the above technical problems, in a first aspect, a server protocol configuration method is provided, the method comprising:
[0006] Acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format;
[0007] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain first configuration data and second configuration data;
[0008] Obtaining target protocol configuration space state information, and determining a protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information;
[0009] Obtaining a target configuration instruction type and target server information, generating a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and performing protocol configuration on the target server according to the protocol configuration request;
[0010] In response to the target server executing the protocol configuration completing, the target server executing the protocol configuration result is verified.
[0011] In one embodiment, obtaining the expected protocol configuration information includes:
[0012] Obtaining initial protocol configuration information, and parsing the initial protocol configuration information based on a protocol configuration template;
[0013] Obtain the target configuration instruction type corresponding to the target server, and obtain the configuration information parsing rule based on the target configuration instruction type;
[0014] The initial protocol configuration information is parsed based on the configuration information parsing rule to obtain the expected protocol configuration information.
[0015] In one embodiment, obtaining the target configuration instruction type and target server information includes:
[0016] Obtain target server information and protocol configuration template, the protocol configuration template includes the correspondence between server information, configuration instructions and protocol configuration information;
[0017] Based on the target server information, the target configuration instruction type corresponding to the target server is searched from the protocol configuration template.
[0018] In one embodiment, extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain the first configuration data and the second configuration data includes:
[0019] Traversing the initial protocol configuration information of the target format, extracting first configuration data of the initial protocol configuration information of the target format, the first configuration data including a protocol configuration ID, an enabled state, a first alarm IP, and a first alarm port;
[0020] The expected protocol configuration information is obtained, and second configuration data of the expected protocol configuration information is extracted, where the second configuration data includes a second alarm IP and a second alarm port.
[0021] In one embodiment, the method of obtaining the target protocol configuration space state information and determining the protocol configuration corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information includes:
[0022] Determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port;
[0023] If there is a match, determining whether the enablement state of the target entry in the target protocol configuration space is enabled;
[0024] If yes, there is no need to configure the first alarm IP and the first alarm port, and the protocol configuration ID of the first configuration data is output;
[0025] If not, the protocol configuration information assembly operation is performed, and the enabling state of the target entry is changed to enabled, and the target entry is output.
[0026] If the first alarm IP, the first alarm port and the second alarm IP, the second alarm port do not match, then determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space;
[0027] If it exists, assign the first alarm IP and the first alarm port to the target entry whose startup state is not enabled, change the enablement state of the target entry to be assigned to enabled, and output the target entry;
[0028] If it does not exist, obtain the protocol configuration policy type. If the protocol configuration policy type is a target type, assign the first alarm IP and the first alarm port to the target entry and output them.
[0029] If the protocol configuration policy type is a non-target type, the target entry corresponding to the target server is returned to be full.
[0030] In one embodiment, in response to the target server completing the execution of the protocol configuration, verifying the result of the target server executing the protocol configuration includes:
[0031] In response to the target server executing the protocol configuration completion, determining whether the second configuration data exists in the target entry, and obtaining the activation state of the target entry;
[0032] If the second configuration data exists in the target entry and the enabling state of the target entry is enabled, obtaining a test alarm sending command;
[0033] Determine whether the protocol receiving end can receive the test alarm sending command sent by the target server;
[0034] If yes, it is considered that the target server executes the protocol configuration result successfully;
[0035] If not, it is considered that the target server has failed to execute the protocol configuration result.
[0036] In one of the embodiments, in response to the target server executing the protocol configuration result successfully, configuring the detection time, and starting to run the scheduled task according to the detection time, the scheduled task is used to detect the running status of the target server at the detection time;
[0037] In response to receiving an alarm message from a target server during the execution of a scheduled task, increasing a counter value;
[0038] When the scheduled task is not completed and the counter value is greater than the preset threshold, the alarm level of the alarm information received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm information of the target server with the target alarm level is received during the running of the scheduled task;
[0039] If so, the target server is considered to be operating abnormally and the operator is notified;
[0040] If not, reconfigure the preset threshold.
[0041] In order to solve the above technical problem, in a second aspect, a server protocol configuration device is provided, the device comprising:
[0042] An acquisition module, used to acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format;
[0043] An extraction module, used to extract data from the initial protocol configuration information and the expected protocol configuration information in the target format to obtain first configuration data and second configuration data;
[0044] A determination module, used to obtain the target protocol configuration space state information, and determine the protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information;
[0045] An execution module is used to obtain a target configuration instruction type and target server information, generate a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and execute the protocol configuration on the target server according to the protocol configuration request;
[0046] The verification module is used to verify the result of executing the protocol configuration on the target server in response to the completion of executing the protocol configuration on the target server.
[0047] In order to solve the above technical problem, a third aspect provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: the processor implements the steps of the above first aspect method when executing the computer program.
[0048] In order to solve the above technical problems, in a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of the above first aspect are implemented.
[0049] Different from the related art, in this application, the initial protocol configuration information is serialized into the initial protocol configuration information of the target format; the initial protocol configuration information of the target format and the expected protocol configuration information are respectively extracted to obtain the first configuration data and the second configuration data; the protocol configuration method corresponding to the target server is determined based on the first configuration data, the second configuration data and the target protocol configuration space state information; the target configuration instruction type and the target server information are obtained, and a protocol configuration request is generated based on the target server information, the protocol configuration method and the target configuration instruction type, and the protocol configuration is executed on the target server according to the protocol configuration request; in response to the completion of the protocol configuration execution on the target server, the protocol configuration result of the target server is verified. In this way, the initial protocol configuration information and the expected protocol configuration information are first compared to determine the protocol configuration method corresponding to the target server, and then a protocol configuration request is generated based on the target server information, the protocol configuration method and the target configuration instruction type, and the protocol configuration is executed on the target server according to the protocol configuration request, which can improve the accuracy of the protocol configuration and prevent the erroneous coverage of the existing protocol configuration, and the protocol configuration result of the target server after the protocol configuration is completed is verified, which can improve the reliability of the server protocol configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a flow chart of a server protocol configuration method in one embodiment;
[0051] Figure 2 A schematic flow chart of a server protocol configuration method in another embodiment;
[0052] Figure 3 A structural block diagram of a server protocol configuration system in one embodiment;
[0053] Figure 4 It is a structural block diagram of a server protocol configuration device in one embodiment;
[0054] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] SNMP (Simple Network Management Protocol) is a protocol widely used in network management, in which Trap messages are used to report device status changes and fault events to the management system. In related technologies, the method of implementing batch SNMP Trap configuration is mainly to obtain the server IP address and server-related information, match it to each brand, and then generate SNMP Trap configuration instructions according to each brand, and then execute the configuration instructions in a loop, and finally verify whether the IP configuration is successful.
[0057] From the description of the above related technologies, it can be seen that when performing batch configuration of SNMP Trap, the SNMP Trap configuration in each service is not checked in advance, which is equivalent to using the same configuration file for all machines of the same model. This may cause the original server to have an old SNMP Trap configuration, but the new configuration will overwrite the original configuration. Because in a large-scale data center or computer room, there may be multiple sets of health monitoring programs, and multiple sets of SNMP Trap configurations are configured. Overwriting old information may cause accidents. In addition, after the configuration is completed, it is considered that the configuration is completed after the configuration is successfully completed. There is a problem here. After the configuration is successful, a connectivity test should be performed to ensure that the Trap alarm can be sent to the target machine after the configuration; and the result after the configuration is completed may be modified or overwritten by other programs, resulting in the target machine being unable to obtain the Trap alarm. In addition, the use of loops to set the SNMP Trap configuration in the related technology does not improve efficiency, and it also takes a lot of time when there are many servers to configure.
[0058] In view of the above technical problems, in one embodiment, Figure 1 As shown, the present application provides a server protocol configuration method, which specifically includes the following steps:
[0059] Step S10, obtaining initial protocol configuration information and expected protocol configuration information, and serializing the initial protocol configuration information into initial protocol configuration information in a target format.
[0060] Specifically, the protocol configuration of the present application may be SNMP Trap configuration of the server. The initial protocol configuration information may be obtained from the server, the protocol configuration template may be called according to the initial protocol configuration information, the configuration instruction type corresponding to the initial protocol configuration information may be obtained from the protocol configuration template, and the initial protocol configuration information may be parsed according to the configuration instruction type to obtain the expected protocol configuration information. Exemplarily, if the Trap url type configuration instruction is used when obtaining the protocol configuration information, the initial protocol configuration information is parsed according to the parsing rules of the url return information; if the ipmitool type configuration instruction is used when obtaining the protocol configuration information, the initial protocol configuration information is parsed according to the parsing rules of the ipmitool command.
[0061] The protocol configuration template is pre-configured, and includes the corresponding relationship between server information, configuration instructions, and protocol configuration information.
[0062] Even for servers from the same manufacturer, the configuration information obtained may be different. For example, a general server can configure three or four alarm policies, and some models can configure more alarm policies; some servers may be configured with the first policy, some may be configured with the third policy, or all of them. Therefore, it is necessary to compare and assemble the configuration information. First, the obtained initial protocol configuration information is serialized into the corresponding format in the template, that is, the initial protocol configuration information is serialized into the initial protocol configuration information of the target format, and the data of the initial protocol configuration information of the target format is looped through, and the first configuration data is read in the loop, and then compared with the second configuration data in the expected protocol configuration information.
[0063] Step S11 , extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format to obtain first configuration data and second configuration data.
[0064] Specifically, traverse the initial protocol configuration information of the target format, extract the first configuration data of the initial protocol configuration information of the target format, the first configuration data includes the protocol configuration ID, the enabled status, the first alarm IP, and the first alarm port; obtain the expected protocol configuration information, extract the second configuration data of the expected protocol configuration information, the second configuration data includes the second alarm IP and the second alarm port.
[0065] Step S12: Acquire target protocol configuration space state information, and determine the protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information.
[0066] The target protocol configuration space status information refers to the protocol configuration space corresponding to the target server. Generally, the protocol configuration space of the target server can be configured with a certain number of alarm policies. The method for determining the protocol configuration corresponding to the target server through the first configuration data, the second configuration data and the target protocol configuration space status information includes: judging whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port; if they match, judging whether the enablement status of the target entry in the target protocol configuration space is enabled; if so, there is no need to configure the first alarm IP and the first alarm port, and output the protocol configuration ID of the first configuration data; if not, executing the protocol configuration information assembly operation, and changing the enablement status of the target entry to enabled, and outputting the target entry.
[0067] Specifically, determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port, that is, determine whether the expected second alarm IP and the second alarm port exist in the initial protocol configuration information obtained. If so, determine that the target entry's enable state is enabled. The target entry represents the expected protocol configuration information that needs to be configured. If the target entry's enable state is enabled, it means that the alarm IP and port (second alarm IP, second alarm port) to be configured already exist and do not need to be configured again. Output the corresponding protocol ID and jump to the next step. If the target entry's enable state is not enabled, start assembling the configuration information, change the enable state to enabled, and then output the entry. This entry is the expected protocol configuration information.
[0068] In one embodiment, determining whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port also includes: if the first alarm IP and the first alarm port do not match the second alarm IP and the second alarm port, determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space; if so, assigning the first alarm IP and the first alarm port to the target entry with a startup status of not enabled, and changing the enable status of the assigned target entry to enabled, and outputting the target entry; if not, obtaining the protocol configuration policy type, and if the protocol configuration policy type is a target type, assigning the first alarm IP and the first alarm port to the target entry and outputting it; if the protocol configuration policy type is a non-target type, returning that the target entry corresponding to the target server is full.
[0069] Specifically, if the first alarm IP, the first alarm port do not match the second alarm IP, the second alarm port, it means that the expected second alarm IP, the second alarm port do not exist in the initial protocol configuration information obtained. Further determine whether there is a target entry with a startup status of not enabled in the target protocol configuration space, that is, whether there is a target entry in the protocol configuration space of the target server that has no alarm policy configured. If there is an enabled entry, assign the second alarm IP and the second alarm port to the entry, change the enablement status to enabled, and then output the entry. If the enablement status of all entries is enabled, read the protocol configuration policy and obtain the type of the protocol configuration policy. If the protocol configuration policy type is a target type, that is, the protocol configuration policy is a forced overwrite, assign the second alarm IP and the second alarm port to the entry and output the entry together. If the protocol configuration policy type is a non-target type, the protocol configuration policy is not a forced overwrite, then record the target server information, and return that the target server protocol configuration entry is full, please process manually.
[0070] Step S13: Obtain the target configuration instruction type and target server information, generate a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and perform protocol configuration on the target server according to the protocol configuration request.
[0071] The protocol configuration template of the present application provides the correspondence between server manufacturers, server models (server information) and configuration information, and also includes configuration instructions and parameter analysis content to facilitate rapid data search.
[0072] In this application, before assembling the configuration request, it is also necessary to obtain the configuration instruction type corresponding to the target server, that is, the configuration type of the server of this model, and assemble the configuration request according to the type of configuration instruction.
[0073] For example, if the configuration type corresponding to the model is ipmitool, the name used in Trap->SET->param corresponds to the data returned in the previous step, and then is converted into ascii with a length of the data difference defined by location according to the parameter processing rules in location and rule. For example, int2ascii converts int type data into ascii, and then splices the ascii according to the data defined by location, and then splices it with the cmd command to form a complete Trap configuration ipmitool command.
[0074] If the configuration type corresponding to the model is redfish, then according to the name used in Trap->SET->param and the data returned in the previous step, corresponding to the previous step, check whether the set data is legal according to the verification rules in rule. After the verification is successful, according to the correspondence between name and key, the value of the data is assigned to paramjson. After the assignment is completed, the request parameters are assembled, and then a complete http request can be formed according to the data and request parameters in cmd and method. The legitimacy of the set data is verified by the verification rules, which is conducive to improving the reliability of the server's protocol configuration.
[0075] After a protocol configuration request is generated based on the target server information, the protocol configuration method, and the target configuration instruction type, the protocol configuration is performed on the target server according to the protocol configuration request.
[0076] Step S14: In response to the target server executing the protocol configuration being completed, verifying the target server executing the protocol configuration result.
[0077] In response to the target server completing the execution of the protocol configuration, verifying the result of the target server executing the protocol configuration includes: in response to the target server completing the execution of the protocol configuration, determining whether the second configuration data exists in the target entry, and obtaining the enabled state of the target entry; if the second configuration data exists in the target entry and the enabled state of the target entry is enabled, obtaining a test alarm sending command; determining whether the protocol receiving end can receive the test alarm sending command sent by the target server; if so, it is considered that the target server executes the protocol configuration result successfully; if not, it is considered that the target server executes the protocol configuration result failed.
[0078] Specifically, the first step of verification is performed to obtain the protocol configuration information of the target server, and then the combination of the alarm IP and the alarm port is compared to see whether it exists in the target entry of the target server, and whether the target entry is enabled. If the above conditions are met, the second step of verification is started, and the test alarm sending command is obtained from the protocol template, and the test alarm command is sent from the server management software to the target server. Then wait for a while to see whether the protocol receiving end can receive the test alarm sent by the target server. If it is received, it means that the target server protocol configuration is normal, otherwise it is an alarm exception, which may be caused by the failure of the target server, the abnormal network link, or the failure of the protocol receiving end, and manual processing is required. If the first step of the test fails, the protocol configuration process is restarted. If the verification result of the first step of verification is repeatedly failed, it means that someone or software has repeatedly performed the protocol configuration, resulting in the existing protocol configuration being overwritten, and it is necessary to send an alarm configuration exception to notify the management personnel to check. In this way, the problem of easy overwriting and detection after overwriting during the server protocol configuration process and subsequent maintenance can be solved.
[0079] In one embodiment, when the verification result of the protocol configuration result executed on the target server is successful, the scheduled task is started, and the server is inspected regularly to detect whether the protocol configuration function is normal. In practical applications, if the protocol alarm of a server is not received, there will be two situations. One is that the server does not generate an alarm; the other is that there is a problem with the protocol configuration, or the server fails and the alarm cannot be sent. Therefore, it is necessary to regularly detect the server protocol status. The inspection interval is specified in the scheduled task, and the verification module call is triggered when the specified time interval is reached; when a protocol alarm of a server is received within the time interval, the timer corresponding to the server is reset and the timing is restarted. In this way, the server can be quickly and efficiently configured for protocol, and the protocol configuration can be continuously monitored. The work efficiency of operation and maintenance personnel can be improved and labor costs can be saved.
[0080] In one embodiment, the present application also includes converting the format of the alarm data to obtain the alarm data in the target format, and generating a link address of the alarm data in the target format; the target format is a format that can be recognized by the WEB page; sending the link address to the WEB server, so that the WEB server obtains the alarm data in the target format according to the link address and displays it in the WEB page.
[0081] The target format of the alarm data can be a format that can be recognized by the WEB page, and the target format of the alarm data can be set according to the user's needs. Generally, the format of the abnormal data generated by the BMC client in the server to be tested when detecting a monitoring event is relatively messy and not uniform, so that the user cannot easily analyze and process the abnormal data; therefore, it is necessary to convert the format of the original alarm data to obtain the alarm data in the uniform format required by the user; after the SNMP server generates the alarm data in the target format, it is saved in the SNMP log file, and then a soft connection can be established with the WEB server. The soft connection refers to establishing a synchronous link address for the SNMP log file in the WEB server, so that the WEB server can directly obtain the alarm data in the target format according to the address, which improves the efficiency of users viewing data.
[0082] See also Figure 2In a specific implementation, in this application, the SNMPTrap configuration tool in the BMC configuration page is first started to obtain BMC information. The BMC information includes the input server BMC IP, user name, password and protocol information, and the scanned server information is obtained. Then, the Trap policy is configured through the Trap configuration policy module. The Trap policy includes the Trap version, alarm level, alarm IP, alarm port, whether to force overwrite existing entries during configuration, etc. Start to execute the Trap configuration function to obtain the Trap configuration information of all servers; assemble the Trap configuration information according to the Trap configuration policy, the Trap configuration information obtained in the previous step, and the data in the Trap template; write the configuration information to the corresponding server through the task module; after the configuration is completed, call the verification module to verify whether the Trap information is actually configured successfully; if the first step verification is successful, the second step verification is performed. If the first step verification fails, how to return to the third step, restart the configuration, and notify the management personnel. If the second step verification is successful, it means that the Trap configuration is successful, and the configuration is successful, and the Trap alarm can be sent and received normally; if the second step verification fails, it means that there is a fault in the server or the Trap receiving module, and the management personnel need to be notified. When the Trap verification succeeds, the scheduled task module is enabled. Regular inspections are performed on the server to check whether the Trap configuration function is normal. In this way, SNMP Trap configuration can be performed quickly and efficiently, and the Trap configuration can be continuously monitored. Abnormal Trap configuration can be quickly discovered, which improves the reliability of server operation and maintenance, and can be quickly discovered when a server problem occurs.
[0083] In one embodiment, the server protocol configuration method of the present application is applied to the server protocol configuration system, and is described by taking the SNMP Trap protocol as an example. Figure 3 As shown:
[0084] The server protocol configuration system of the present application includes an asset scanning module, a storage module, a protocol acquisition module (Trap acquisition module), a protocol configuration strategy (Trap configuration strategy), a protocol assembly module (Trap assembly module), a task execution module, a configuration module, a scheduled task module, a verification module and a protocol receiving module (Trap receiving module).
[0085] The asset scanning module is used to scan and discover all machines that require SNMP Trap configuration. By entering the server BMCIP, user name, password and protocol information, the server can be automatically scanned to obtain information such as the server manufacturer and model.
[0086] The Trap configuration policy module is used to set the Trap configuration policy, such as Trap version, alarm level, alarm IP, alarm port, whether to force overwrite existing entries during configuration, etc. The alarm IP address defaults to the IP address of the machine running the program, and the alarm IP can also be specified.
[0087] The storage module is used to save the scanned asset information for subsequent use.
[0088] The Trap template is included in the configuration template of the server management software. The Trap template contains Trap compatibility information of different manufacturers and models, including the Trap URL information for obtaining, setting and sending test alarms of the restful and redfish protocols, the parsing rules for requesting input parameters and returning information; the commands for obtaining, setting and sending test alarms of ipmitool, and the parsing rules for the parameters in the commands. As shown in the following example, templates can also be defined in other forms. The role of the template is to provide the correspondence between manufacturers, models and configuration information, as well as the parsing of configuration instructions and parameters. The Restful template is similar to the redfish, and is not listed one by one.
[0089] When you need to obtain Trap configuration information, you need to find the corresponding query configuration information (Trap configuration information) url or ipmitool command (configuration instruction) information in the protocol configuration template based on the server information scanned by the asset, including server manufacturer, model, IP, version and other information. Then combine the server IP, user name, password and Trap configuration information or ipmitool command information into a task and hand it over to the task execution module. The task execution module can execute Trap configuration acquisition in batches. Then the task execution module returns the original Trap configuration information (initial protocol configuration information) obtained from the server. The configuration acquisition module calls the protocol configuration template again according to the original Trap configuration information (initial protocol configuration information) to parse the original Trap configuration information (initial protocol configuration information). If the Trap url is used for acquisition, it is parsed according to the parsing rules of the url return information; if the ipmitool command is used for acquisition, it is parsed according to the parsing rules of the ipmitool command. Finally, the expected protocol configuration information after parsing is returned.
[0090] When assembling the Trap configuration information, the Trap information (protocol information) configured by the user includes the Trap version, alarm level, alarm IP, alarm port and other information. The Trap information obtained by the Trap acquisition module and the corresponding template information in the Trap are used to assemble the Trap configuration information (protocol configuration information). Because the SNMPTrap configuration interfaces of servers of different manufacturers and models are different, and the required parameters are also different, it is necessary to find a template that is adapted to the server model through the above template, and assemble the information in the config (configuration information) in the template into a data structure suitable for the model; compare and assemble the initial protocol configuration information and the expected protocol configuration information, first serialize the obtained SNMP Trap configuration information into the corresponding format in the template (initial protocol configuration information in the target format), and then loop through the serialized data, read the protocol ID, enablement status, alarm IP, alarm port and other information in the loop, and then compare them one by one with the alarm IP and alarm port to be set (to determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port).
[0091] If the combination of alarm IP and alarm port (second alarm IP, second alarm port) to be set already exists in the obtained SNMP Trap information, then determine whether the enablement status is enabled. If the enablement status is enabled, it means that (second alarm IP, second alarm port) already exists and no further configuration is required. Output the corresponding protocol ID and jump to the next step. If the enablement status is not enabled, start assembling the configuration information, change the enablement status to enabled, and then output the entry. This entry is the SNMP Trap information that needs to be configured.
[0092] If the alarm IP and alarm port combination (second alarm IP, second alarm port) to be set does not exist in the obtained SNMP Trap information, it is determined whether there is an entry with an enabled state of not enabled. If there is an entry with an enabled state, the alarm IP and alarm port are assigned to the entry, and the enabled state is changed to enabled, and then the entry is output;
[0093] If all entries are enabled, read the Trap configuration policy (protocol configuration policy type). If the protocol policy type is forced overwrite, assign the alarm IP and alarm port to the entry and output the entry. If the protocol policy type is not forced overwrite, record the machine information and return the machine Trap configuration entry is full, please handle it manually.
[0094] Next, according to the type of configuration instruction, the request information is assembled. During the verification, the SNMP Trap configuration information is verified to be successfully set. The verification is divided into two steps. The first step is to call the Trap acquisition module to obtain the SNMP Trap configuration information of the target server, and then compare whether the combination of the alarm IP and the alarm port exists in the entry and whether the entry is enabled. If the above conditions are met, the second step of verification begins. The test alarm sending command is obtained from the Trap template, and the test alarm command is sent from the server management software to the target server. Then wait for a while to check whether the Trap receiver can receive the test alarm sent by the target server. If it is received, it means that the SNMP Trap configuration is normal. Otherwise, it is an alarm exception. The reason may be a target server failure, a network link abnormality, or a Trap receiver failure, and manual processing is required. If the first step of the test fails, the Trap assembly module is called to restart the Trap configuration process. If the first step of the Trap detection fails repeatedly, it means that someone or software has repeatedly configured the SNMP Trap, resulting in the existing SNMP Trap configuration being overwritten. It is necessary to send an alarm configuration abnormality notification to the management personnel for inspection.
[0095] This application also includes server inspections, and periodically calling the verification module to detect whether the Trap configuration in the server is available. Because if you never receive a Trap alarm from a server, there will be two situations. One is that the server does not generate an alarm; the other is that there is a problem with the Trap configuration, or the server fails and the alarm cannot be sent. Therefore, it is necessary to regularly check the server Trap status. Specify the inspection interval in the scheduled task, and when the specified time interval is reached, the verification module call is triggered; when a Trap alarm is received from a server within the time interval, the timer corresponding to the server is reset to zero and the timing starts again.
[0096] The Trap receiving module is used to receive the Trap alarm sent from the server and parse the alarm content; if it is a test alarm, the alarm notification is pushed to the verification module, and the verification module can judge whether the Trap configuration function is normal based on the test alarm. If the alarm content is a normal alarm information in the server, the alarm information is stored in the storage module and pushed to the timing task module. The timing task module clears the corresponding timer and restarts the timing.
[0097] In one embodiment, in response to the target server executing the protocol configuration result successfully, a detection time is configured, and a scheduled task is started according to the detection time, and the scheduled task is used to detect the operating status of the target server at the detection time; in response to receiving an alarm message from the target server during the running of the scheduled task, a counter value is increased; when the scheduled task is not completed and the counter value is greater than a preset threshold, the alarm level of the alarm message received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm message of the target server of the target alarm level is received during the running of the scheduled task; if so, it is considered that the target server is operating abnormally and the operator is notified; if not, the preset threshold is reconfigured.
[0098] Specifically, a detection time will be set first, and the detection time can be the detection interval. When the result of executing the protocol configuration from the target server is successful, the counter is turned on. Whenever an alarm message from the target server is received during the running of the scheduled task, 1 is added to the counter value. The initial value of the counter of each scheduled task is 0. During the execution of a scheduled task, if the value of the counter is greater than the preset threshold, it is further determined whether these counted alarm messages include alarm messages of the target level. Here, the alarm messages of the target level refer to alarm messages with a higher alarm level and more serious alarms. If these counted alarm messages include alarm messages of the target level, it is considered that the target server is running abnormally, and the operator is contacted for maintenance. If the counted alarm messages do not include alarm messages of the target level, it is considered that the preset threshold is set too low, and the value of the preset threshold can be increased. In this way, the running status of the target server is further verified by setting the values of the scheduled task and the number of alarms, and the reliability of the target server can be improved.
[0099] It should be understood that although Figure 1-Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0100] In one embodiment, Figure 4 As shown, a server protocol configuration device is provided, including: an acquisition module 30, an extraction module 31, a determination module 32, an execution module 33 and a verification module 34, wherein:
[0101] An acquisition module 30 is used to acquire initial protocol configuration information and expected protocol configuration information, and to serialize the initial protocol configuration information into initial protocol configuration information in a target format;
[0102] An extraction module 31 is used to extract data from the initial protocol configuration information and the expected protocol configuration information in the target format to obtain first configuration data and second configuration data;
[0103] A determination module 32, configured to obtain target protocol configuration space state information, and determine a protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information;
[0104] An execution module 33 is used to obtain a target configuration instruction type and target server information, generate a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and execute the protocol configuration on the target server according to the protocol configuration request;
[0105] The verification module 34 is used to verify the result of executing the protocol configuration on the target server in response to the completion of executing the protocol configuration on the target server.
[0106] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0107] Obtaining the expected protocol configuration information includes:
[0108] Obtaining initial protocol configuration information, and parsing the initial protocol configuration information based on a protocol configuration template;
[0109] Obtain the target configuration instruction type corresponding to the target server, and obtain the configuration information parsing rule based on the target configuration instruction type;
[0110] The initial protocol configuration information is parsed based on the configuration information parsing rule to obtain the expected protocol configuration information.
[0111] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0112] Obtaining the target configuration instruction type and target server information includes:
[0113] Obtain target server information and protocol configuration template, the protocol configuration template includes the correspondence between server information, configuration instructions and protocol configuration information;
[0114] Based on the target server information, the target configuration instruction type corresponding to the target server is searched from the protocol configuration template.
[0115] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0116] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain the first configuration data and the second configuration data includes:
[0117] Traversing the initial protocol configuration information of the target format, extracting first configuration data of the initial protocol configuration information of the target format, the first configuration data including a protocol configuration ID, an enabled state, a first alarm IP, and a first alarm port;
[0118] The expected protocol configuration information is obtained, and second configuration data of the expected protocol configuration information is extracted, where the second configuration data includes a second alarm IP and a second alarm port.
[0119] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0120] The method of obtaining the target protocol configuration space state information and determining the protocol configuration corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information includes:
[0121] Determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port;
[0122] If there is a match, determining whether the enablement state of the target entry in the target protocol configuration space is enabled;
[0123] If yes, there is no need to configure the first alarm IP and the first alarm port, and the protocol configuration ID of the first configuration data is output;
[0124] If not, the protocol configuration information assembly operation is performed, and the enabling state of the target entry is changed to enabled, and the target entry is output.
[0125] If the first alarm IP, the first alarm port and the second alarm IP, the second alarm port do not match, then determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space;
[0126] If it exists, assign the first alarm IP and the first alarm port to the target entry whose startup state is not enabled, change the enablement state of the target entry to be assigned to enabled, and output the target entry;
[0127] If it does not exist, obtain the protocol configuration policy type. If the protocol configuration policy type is a target type, assign the first alarm IP and the first alarm port to the target entry and output them.
[0128] If the protocol configuration policy type is a non-target type, the target entry corresponding to the target server is returned to be full.
[0129] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0130] In response to the target server executing the protocol configuration, verifying the target server executing the protocol configuration result includes:
[0131] In response to the target server executing the protocol configuration completion, determining whether the second configuration data exists in the target entry, and obtaining the activation state of the target entry;
[0132] If the second configuration data exists in the target entry and the enabling state of the target entry is enabled, obtaining a test alarm sending command;
[0133] Determine whether the protocol receiving end can receive the test alarm sending command sent by the target server;
[0134] If yes, it is considered that the target server executes the protocol configuration result successfully;
[0135] If not, it is considered that the target server has failed to execute the protocol configuration result.
[0136] In one embodiment, the above device can implement another implementation of the server protocol configuration method, and the specific steps are as follows:
[0137] In response to the target server executing the protocol configuration result successfully, configuring the detection time, and starting to run the scheduled task according to the detection time, the scheduled task is used to detect the running status of the target server at the detection time;
[0138] In response to receiving an alarm message from a target server during the execution of a scheduled task, increasing a counter value;
[0139] When the scheduled task is not completed and the counter value is greater than the preset threshold, the alarm level of the alarm information received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm information of the target server with the target alarm level is received during the running of the scheduled task;
[0140] If so, the target server is considered to be operating abnormally and the operator is notified;
[0141] If not, reconfigure the preset threshold.
[0142] For the specific definition of the server protocol configuration device, please refer to the definition of the server protocol configuration method above, which will not be repeated here. Each module in the above-mentioned server protocol configuration device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0143] In one embodiment, the present application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the server protocol configuration method provided by the above methods.
[0144] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data used in the server protocol configuration method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a server protocol configuration method is implemented.
[0145] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0146] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0147] Acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format;
[0148] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain first configuration data and second configuration data;
[0149] Obtaining target protocol configuration space state information, and determining a protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information;
[0150] Obtaining a target configuration instruction type and target server information, generating a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and performing protocol configuration on the target server according to the protocol configuration request;
[0151] In response to the target server executing the protocol configuration completing, the target server executing the protocol configuration result is verified.
[0152] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0153] Obtaining the expected protocol configuration information includes:
[0154] Obtaining initial protocol configuration information, and parsing the initial protocol configuration information based on a protocol configuration template;
[0155] Obtain the target configuration instruction type corresponding to the target server, and obtain the configuration information parsing rule based on the target configuration instruction type;
[0156] The initial protocol configuration information is parsed based on the configuration information parsing rule to obtain the expected protocol configuration information.
[0157] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0158] Obtaining the target configuration instruction type and target server information includes:
[0159] Obtain target server information and protocol configuration template, the protocol configuration template includes the correspondence between server information, configuration instructions and protocol configuration information;
[0160] Based on the target server information, the target configuration instruction type corresponding to the target server is searched from the protocol configuration template.
[0161] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0162] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain the first configuration data and the second configuration data includes:
[0163] Traversing the initial protocol configuration information of the target format, extracting first configuration data of the initial protocol configuration information of the target format, the first configuration data including a protocol configuration ID, an enabled state, a first alarm IP, and a first alarm port;
[0164] The expected protocol configuration information is obtained, and second configuration data of the expected protocol configuration information is extracted, where the second configuration data includes a second alarm IP and a second alarm port.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] The method of obtaining the target protocol configuration space state information and determining the protocol configuration corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information includes:
[0167] Determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port;
[0168] If there is a match, determining whether the enablement state of the target entry in the target protocol configuration space is enabled;
[0169] If yes, there is no need to configure the first alarm IP and the first alarm port, and the protocol configuration ID of the first configuration data is output;
[0170] If not, the protocol configuration information assembly operation is performed, and the enabling state of the target entry is changed to enabled, and the target entry is output.
[0171] If the first alarm IP, the first alarm port and the second alarm IP, the second alarm port do not match, then determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space;
[0172] If it exists, assign the first alarm IP and the first alarm port to the target entry whose startup state is not enabled, change the enablement state of the target entry to be assigned to enabled, and output the target entry;
[0173] If it does not exist, obtain the protocol configuration policy type. If the protocol configuration policy type is a target type, assign the first alarm IP and the first alarm port to the target entry and output them.
[0174] If the protocol configuration policy type is a non-target type, the target entry corresponding to the target server is returned to be full.
[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0176] In response to the target server executing the protocol configuration, verifying the target server executing the protocol configuration result includes:
[0177] In response to the target server executing the protocol configuration completion, determining whether the second configuration data exists in the target entry, and obtaining the activation state of the target entry;
[0178] If the second configuration data exists in the target entry and the enabling state of the target entry is enabled, obtaining a test alarm sending command;
[0179] Determine whether the protocol receiving end can receive the test alarm sending command sent by the target server;
[0180] If yes, it is considered that the target server executes the protocol configuration result successfully;
[0181] If not, it is considered that the target server has failed to execute the protocol configuration result.
[0182] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0183] In response to the target server executing the protocol configuration result successfully, configuring the detection time, and starting to run the scheduled task according to the detection time, the scheduled task is used to detect the running status of the target server at the detection time;
[0184] In response to receiving an alarm message from a target server during the execution of a scheduled task, increasing a counter value;
[0185] When the scheduled task is not completed and the counter value is greater than the preset threshold, the alarm level of the alarm information received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm information of the target server with the target alarm level is received during the running of the scheduled task;
[0186] If so, the target server is considered to be operating abnormally and the operator is notified;
[0187] If not, reconfigure the preset threshold.
[0188] A computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0189] Acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format;
[0190] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain first configuration data and second configuration data;
[0191] Obtaining target protocol configuration space state information, and determining a protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information;
[0192] Obtaining a target configuration instruction type and target server information, generating a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and performing protocol configuration on the target server according to the protocol configuration request;
[0193] In response to the target server executing the protocol configuration completing, the target server executing the protocol configuration result is verified.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] Obtaining the expected protocol configuration information includes:
[0196] Obtaining initial protocol configuration information, and parsing the initial protocol configuration information based on a protocol configuration template;
[0197] Obtain the target configuration instruction type corresponding to the target server, and obtain the configuration information parsing rule based on the target configuration instruction type;
[0198] The initial protocol configuration information is parsed based on the configuration information parsing rule to obtain the expected protocol configuration information.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Obtaining the target configuration instruction type and target server information includes:
[0201] Obtain target server information and protocol configuration template, the protocol configuration template includes the correspondence between server information, configuration instructions and protocol configuration information;
[0202] Based on the target server information, the target configuration instruction type corresponding to the target server is searched from the protocol configuration template.
[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0204] Extracting data from the initial protocol configuration information and the expected protocol configuration information in the target format respectively to obtain the first configuration data and the second configuration data includes:
[0205] Traversing the initial protocol configuration information of the target format, extracting first configuration data of the initial protocol configuration information of the target format, the first configuration data including a protocol configuration ID, an enabled state, a first alarm IP, and a first alarm port;
[0206] The expected protocol configuration information is obtained, and second configuration data of the expected protocol configuration information is extracted, where the second configuration data includes a second alarm IP and a second alarm port.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] The method of obtaining the target protocol configuration space state information and determining the protocol configuration corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information includes:
[0209] Determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port;
[0210] If there is a match, determining whether the enablement state of the target entry in the target protocol configuration space is enabled;
[0211] If yes, there is no need to configure the first alarm IP and the first alarm port, and the protocol configuration ID of the first configuration data is output;
[0212] If not, the protocol configuration information assembly operation is performed, and the enabling state of the target entry is changed to enabled, and the target entry is output.
[0213] If the first alarm IP, the first alarm port and the second alarm IP, the second alarm port do not match, then determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space;
[0214] If it exists, assign the first alarm IP and the first alarm port to the target entry whose startup state is not enabled, change the enablement state of the target entry to be assigned to enabled, and output the target entry;
[0215] If it does not exist, obtain the protocol configuration policy type. If the protocol configuration policy type is a target type, assign the first alarm IP and the first alarm port to the target entry and output them.
[0216] If the protocol configuration policy type is a non-target type, the target entry corresponding to the target server is returned to be full.
[0217] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0218] In response to the target server executing the protocol configuration, verifying the target server executing the protocol configuration result includes:
[0219] In response to the target server executing the protocol configuration completion, determining whether the second configuration data exists in the target entry, and obtaining the activation state of the target entry;
[0220] If the second configuration data exists in the target entry and the enabling state of the target entry is enabled, obtaining a test alarm sending command;
[0221] Determine whether the protocol receiving end can receive the test alarm sending command sent by the target server;
[0222] If yes, it is considered that the target server executes the protocol configuration result successfully;
[0223] If not, it is considered that the target server has failed to execute the protocol configuration result.
[0224] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0225] In response to the target server executing the protocol configuration result successfully, configuring the detection time, and starting to run the scheduled task according to the detection time, the scheduled task is used to detect the running status of the target server at the detection time;
[0226] In response to receiving an alarm message from a target server during the execution of a scheduled task, increasing a counter value;
[0227] When the scheduled task is not completed and the counter value is greater than the preset threshold, the alarm level of the alarm information received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm information of the target server with the target alarm level is received during the running of the scheduled task;
[0228] If so, the target server is considered to be operating abnormally and the operator is notified;
[0229] If not, reconfigure the preset threshold.
[0230] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous forwarding path (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0231] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0232] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A server protocol configuration method, characterized in that: include: Acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format; Extracting data from the initial protocol configuration information in the target format and the expected protocol configuration information respectively to obtain first configuration data and second configuration data; Acquire target protocol configuration space state information, and determine a protocol configuration method corresponding to the target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information; Obtaining a target configuration instruction type and target server information, generating a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and performing protocol configuration on the target server according to the protocol configuration request; In response to the target server executing the protocol configuration completing, the target server executing the protocol configuration result is verified.
2. The method according to claim 1, characterized in that The obtaining of the expected protocol configuration information includes: Acquire initial protocol configuration information, and parse the initial protocol configuration information based on a protocol configuration template; Obtain a target configuration instruction type corresponding to the target server, and obtain a configuration information parsing rule based on the target configuration instruction type; The initial protocol configuration information is parsed based on the configuration information parsing rule to obtain the expected protocol configuration information.
3. The method according to claim 1, characterized in that: The acquisition of the target configuration instruction type and the target server information includes: Obtain target server information and a protocol configuration template, wherein the protocol configuration template includes a correspondence between server information, configuration instructions, and protocol configuration information; Based on the target server information, the target configuration instruction type corresponding to the target server is searched from the protocol configuration template.
4. The method according to claim 1, characterized in that: The extracting data from the initial protocol configuration information of the target format and the expected protocol configuration information to obtain the first configuration data and the second configuration data comprises: Traversing the initial protocol configuration information of the target format, extracting first configuration data of the initial protocol configuration information of the target format, wherein the first configuration data includes a protocol configuration ID, an enabled state, a first alarm IP, and a first alarm port; Obtain expected protocol configuration information, and extract second configuration data of the expected protocol configuration information, where the second configuration data includes a second alarm IP and a second alarm port.
5. The method according to claim 4, characterized in that The method of obtaining the target protocol configuration space state information and determining the protocol configuration corresponding to the target server based on the first configuration data, the second configuration data and the target protocol configuration space state information includes: Determine whether the first alarm IP and the first alarm port match the second alarm IP and the second alarm port; If there is a match, determining whether the enablement state of the target entry in the target protocol configuration space is enabled; If yes, there is no need to configure the first alarm IP and the first alarm port, and the protocol configuration ID of the first configuration data is output; If not, the protocol configuration information assembly operation is performed, and the enabling state of the target entry is changed to enabled, and the target entry is output; If the first alarm IP, the first alarm port and the second alarm IP, the second alarm port do not match, determining whether there is a target entry with a startup status of not enabled in the target protocol configuration space; If it exists, assign the first alarm IP and the first alarm port to the target entry whose startup state is not enabled, change the enablement state of the target entry to be assigned to enabled, and output the target entry; If it does not exist, obtain the protocol configuration policy type. If the protocol configuration policy type is a target type, assign the first alarm IP and the first alarm port to the target entry and output them; If the protocol configuration policy type is a non-target type, it is returned that the target entry corresponding to the target server is full.
6. The method according to claim 1, characterized in that In response to the target server completing the protocol configuration, verifying the target server's protocol configuration result includes: In response to the target server executing the protocol configuration completion, determining whether the second configuration data exists in the target entry, and obtaining the activation state of the target entry; If the second configuration data exists in the target entry and the enabling state of the target entry is enabled, obtaining a test alarm sending command; Determine whether the protocol receiving end can receive the test alarm sending command sent by the target server; If yes, it is considered that the target server executes the protocol configuration result successfully; If not, it is considered that the target server has failed to execute the protocol configuration result.
7. The method according to claim 6, characterized in that The method further comprises: In response to the target server executing the protocol configuration result successfully, configuring a detection time, and starting to run a scheduled task according to the detection time, wherein the scheduled task is used to detect the running status of the target server at the detection time; In response to receiving an alarm message from a target server during the execution of a scheduled task, increasing a counter value; When the scheduled task is not completed and the counter value is greater than the preset threshold, the alarm level of the alarm information received from the target server during the running of the scheduled task is obtained, and it is determined whether the alarm information of the target server with the target alarm level is received during the running of the scheduled task; If so, the target server is considered to be operating abnormally and the operator is notified; If not, reconfigure the preset threshold.
8. A server protocol configuration device, characterized in that: The device comprises: An acquisition module, used to acquire initial protocol configuration information and expected protocol configuration information, and serialize the initial protocol configuration information into initial protocol configuration information in a target format; An extraction module, used to extract data from the initial protocol configuration information in the target format and the expected protocol configuration information respectively to obtain first configuration data and second configuration data; A determination module, configured to obtain target protocol configuration space state information, and determine a protocol configuration method corresponding to a target server based on the first configuration data, the second configuration data, and the target protocol configuration space state information; An execution module, used to obtain a target configuration instruction type and target server information, generate a protocol configuration request based on the target server information, the protocol configuration method and the target configuration instruction type, and execute protocol configuration on the target server according to the protocol configuration request; The verification module is used to verify the result of executing the protocol configuration on the target server in response to the target server completing the execution of the protocol configuration.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Server configuration method and device, equipment and storage medium
CN113127099A
Multi-protocol service calling method and device, equipment and medium
CN117119079A
Interface testing method and device, computer equipment and storage medium
CN118093396A
Selective Reestablishment of Cable Modem Internet Protocol Connectivity
US20130097324A1
Cited By
Server detection method, system and device
CN115604069A