Disclosure of Invention
In view of this, the present application provides a method for automatically deploying network device monitoring software, which can effectively improve the efficiency of deploying network device monitoring software by automatically deploying the network device monitoring software, compared with the existing manual deployment manner.
The application provides a method for automatically deploying network equipment monitoring software, which comprises the following steps:
storing the basic monitoring parameters of the target network equipment to a relational database;
receiving a hypertext transfer protocol notification message for deploying the target network device monitoring software;
based on the hypertext transfer protocol notification message for deploying the monitoring software of the target network equipment, judging whether the monitoring software of the target network equipment exists, if not, then:
creating a new path and new monitoring software of the target network equipment;
updating the configuration information of the new monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
modifying the port value of the new monitoring software of the target network equipment, and adding 1 to the port value on the original basis;
and starting new monitoring software of the target network equipment.
Preferably, when the monitoring software of the target network device exists, the method further includes:
updating the configuration information of the original monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
modifying the port value of the original monitoring software of the target network equipment, and adding 1 to the port value on the original basis;
and starting the monitoring software after the target network equipment updates the configuration information.
Preferably, the method further comprises:
receiving a hypertext transfer protocol notification message for deleting the target network equipment monitoring software;
and deleting the monitoring software of the target network equipment based on the hypertext transfer protocol notification message for deleting the monitoring software of the target network equipment.
Preferably, the method further comprises:
receiving a hypertext transfer protocol notification message for modifying the target network device monitoring software;
modifying the monitoring software of the target network device based on the hypertext transfer protocol notification message for modifying the monitoring software of the target network device.
Preferably, the notification message includes: IP information of the target network device.
A system for automated deployment of network device monitoring software, comprising:
the storage module is used for storing the basic monitoring parameters of the target network equipment to the relational database;
a first receiving module, configured to receive a hypertext transfer protocol notification message for deploying the target network device monitoring software;
a judging module, configured to judge whether the monitoring software of the target network device exists based on the hypertext transfer protocol notification message for deploying the monitoring software of the target network device;
the creating module is used for creating a new path and new monitoring software of the target network equipment when the monitoring software of the target network equipment does not exist;
the first updating module is used for updating the configuration information of the new monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
the first modification module is used for modifying the port value of the new monitoring software of the target network equipment and adding 1 to the port value on the original basis;
and the first starting module is used for starting the new monitoring software of the target network equipment.
Preferably, when the monitoring software of the target network device exists, the method further includes:
the second updating module is used for updating the configuration information of the original monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
the second modification module is used for modifying the port value of the original monitoring software of the target network equipment and adding 1 to the port value on the original basis;
and the second starting module is used for starting the monitoring software after the target network equipment updates the configuration information.
Preferably, the system further comprises:
the second receiving module is used for receiving a hypertext transfer protocol notification message for deleting the target network equipment monitoring software;
and the deleting module is used for deleting the monitoring software of the target network equipment based on the hypertext transfer protocol notification message for deleting the monitoring software of the target network equipment.
Preferably, the system further comprises:
a third receiving module, configured to receive a hypertext transfer protocol notification message for modifying the target network device monitoring software;
a modification module for modifying the monitoring software of the target network device based on the hypertext transfer protocol notification message for modifying the monitoring software of the target network device.
Preferably, the notification message includes: IP information of the target network device.
In summary, the present application discloses a method for automatically deploying monitoring software of a network device, when the monitoring software of the network device needs to be deployed, first saving basic monitoring parameters of a target network device to a relational database, then receiving a hypertext transfer protocol notification message for deploying the monitoring software of the target network device, determining whether the monitoring software of the target network device exists based on the hypertext transfer protocol notification message for deploying the monitoring software of the target network device, if not, creating a new path and the new monitoring software of the target network device, updating configuration information of the new monitoring software of the target network device based on the basic monitoring parameters of the target network device, modifying a port value of the new monitoring software of the target network device, adding 1 to the original port value, and starting the new monitoring software of the target network device. The method and the device for deploying the monitoring software of the network equipment can automatically deploy the monitoring software of the network equipment, and can effectively improve the efficiency of deploying the monitoring software of the network equipment compared with the conventional manual deployment mode.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, a flowchart of an embodiment 1 of a method for automatically deploying network device monitoring software disclosed in the present application may include the following steps:
s101, storing basic monitoring parameters of target network equipment to a relational database;
when the monitoring software of the network equipment needs to be deployed, firstly, operation and maintenance personnel carry out monitoring configuration according to a target network, configure basic monitoring parameters of the target network equipment, and store the basic monitoring parameters of the target network equipment into a relational database after the operation and maintenance personnel configure the basic monitoring parameters of the target network equipment. It should be noted that the target network device is a network device that needs to deploy monitoring software.
S102, receiving a hypertext transfer protocol notification message of the monitoring software of the target network equipment;
then, the operation and maintenance personnel send a hypertext transfer protocol notification message for deploying the target network device monitoring software, and the system receives the hypertext transfer protocol notification message for deploying the target network device monitoring software. It should be noted that the received http notification message for deploying the target network device monitoring software may include the IP information of the target network device.
S103, judging whether the monitoring software of the target network equipment exists or not based on the hypertext transfer protocol notification message of the deployed monitoring software of the target network equipment, and if not, entering S104:
after receiving a hypertext transfer protocol notification message for deploying target network equipment monitoring software, pulling a basic monitoring parameter corresponding to the target network equipment from a relational database based on IP information of the target network equipment in the received hypertext transfer protocol notification message for deploying the target network equipment monitoring software, and caching the pulled basic monitoring parameter into a memory; and simultaneously, executing a Linux command, and judging whether the monitoring software with the same brand and model exists according to the information of the monitoring software of the original target network equipment.
S104, creating a new path and new monitoring software of the target network equipment;
when monitoring software of the same brand and model does not exist, a new path and monitoring software is created.
S105, updating the configuration information of new monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
and then, according to the basic monitoring parameters of the target network equipment cached in the memory, revising the configuration information of the newly created monitoring software.
S106, modifying the port value of the new monitoring software of the target network equipment, and adding 1 to the port value on the original basis;
and simultaneously reading the port value of the starting port of the original target network equipment monitoring software, adding 1 to the port value and storing the port value, and then taking the self-increased port value as the starting port value of the newly-created monitoring software of the target network equipment. Because port values of ports cannot be the same for programs started on the same server, otherwise, the program start fails due to port conflicts, and therefore, the port conflicts need to be avoided. Repeating the steps, if more monitoring software of the network equipment is created, the port value of the starting port of the original network equipment monitoring software is increased by 1.
And S107, starting new monitoring software of the target network equipment.
And after the newly created monitoring software parameter configuration is finished, executing the Linux command again, starting the newly created monitoring software, and finishing the deployment of the new target network equipment monitoring software.
To sum up, in the above embodiment, when the monitoring software of the network device needs to be deployed, first, the basic monitoring parameter of the target network device is saved in the relational database, then, the http notification message for deploying the monitoring software of the target network device is received, whether the monitoring software of the target network device exists is determined based on the http notification message for deploying the monitoring software of the target network device, if not, a new path and new monitoring software of the target network device are created, the configuration information of the new monitoring software of the target network device is updated based on the basic monitoring parameter of the target network device, the port value of the new monitoring software of the target network device is modified, 1 is added to the original port value, and the new monitoring software of the target network device is started. The method and the device for deploying the monitoring software of the network equipment can automatically deploy the monitoring software of the network equipment, and can effectively improve the efficiency of deploying the monitoring software of the network equipment compared with the conventional manual deployment mode.
As shown in fig. 2, a flowchart of embodiment 2 of a method for automatically deploying network device monitoring software disclosed in the present application may include the following steps:
s201, storing basic monitoring parameters of target network equipment to a relational database;
when the monitoring software of the network equipment needs to be deployed, firstly, operation and maintenance personnel carry out monitoring configuration according to a target network, configure basic monitoring parameters of the target network equipment, and store the basic monitoring parameters of the target network equipment into a relational database after the operation and maintenance personnel configure the basic monitoring parameters of the target network equipment. It should be noted that the target network device is a network device that needs to deploy monitoring software.
S202, receiving a hypertext transfer protocol notification message for deploying target network equipment monitoring software;
and then, the operation and maintenance personnel send a hypertext transfer protocol notification message for deploying the target network device monitoring software, and the system receives the hypertext transfer protocol notification message for deploying the target network device monitoring software. It should be noted that the received http notification message for deploying the target network device monitoring software may include the IP information of the target network device.
S203, judging whether the monitoring software of the target network equipment exists or not based on the hypertext transfer protocol notification message of the monitoring software of the target network equipment, if so, entering S204:
after receiving a hypertext transfer protocol notification message for deploying target network equipment monitoring software, pulling a basic monitoring parameter corresponding to the target network equipment from a relational database based on IP information of the target network equipment in the received hypertext transfer protocol notification message for deploying the target network equipment monitoring software, and caching the pulled basic monitoring parameter into a memory; and meanwhile, executing a Linux command, and judging whether the monitoring software with the same brand and model exists according to the information of the monitoring software of the original target network equipment.
S204, updating configuration information of original monitoring software of the target network equipment based on the basic monitoring parameters of the target network equipment;
and then, when the monitoring software of the target network equipment exists, modifying the configuration information of the existing monitoring software again according to the basic monitoring parameters of the target network equipment cached in the memory.
S205, modifying the port value of the original monitoring software of the target network equipment, and adding 1 to the port value on the original basis;
and meanwhile, reading the port value of the starting port of the original target network equipment monitoring software, adding 1 to the port value and storing the port value, and then taking the self-increased port value as the starting port value of the monitoring software after the configuration information is modified. Because the port values of the ports of the programs started on the same server cannot be the same, otherwise the programs are started in a failed manner due to port conflict, and therefore the port conflict needs to be avoided. Repeating the steps, if more monitoring software of the network equipment is created, the port value of the starting port of the original network equipment monitoring software is increased by 1.
And S206, starting the monitoring software after the target network equipment updates the configuration information.
And after the configuration information of the original monitoring software is updated, executing the Linux command again, starting the monitoring software, and finishing the deployment of the new target network equipment monitoring software.
To sum up, in the above embodiment, when the monitoring software of the network device needs to be deployed, first, the basic monitoring parameter of the target network device is saved in the relational database, then, the http notification message for deploying the monitoring software of the target network device is received, whether the monitoring software of the target network device exists is determined based on the http notification message for deploying the monitoring software of the target network device, if yes, the configuration information of the original monitoring software of the target network device is updated based on the basic monitoring parameter of the target network device, the port value of the original monitoring software of the target network device is modified, the port value is increased by 1 on the original basis, and the monitoring software of the target network device after updating the configuration information is started. The method and the device for deploying the monitoring software of the network equipment can automatically deploy the monitoring software of the network equipment, and can effectively improve the efficiency of deploying the monitoring software of the network equipment compared with the conventional manual deployment mode.
As shown in fig. 3, which is a flowchart of embodiment 3 of a method for automatically deploying network device monitoring software disclosed in the present application on the basis of the foregoing embodiments, the method may include the following steps:
s301, receiving a hypertext transfer protocol notification message for modifying the monitoring software of the target network equipment;
on the basis of the foregoing embodiment 1 and/or embodiment 2, when monitoring deployment of a target network device needs to be modified, a hypertext transfer protocol notification message for modifying monitoring software of the target network device is received, where the modification message includes IP information of the target network device.
S302, modifying the monitoring software of the target network equipment based on the hypertext transfer protocol notification message for modifying the monitoring software of the target network equipment;
and when receiving a hypertext transfer protocol notification message for modifying the target network equipment monitoring software, modifying the deployment of the target network equipment monitoring software according to the received modification message.
S303, receiving a hypertext transfer protocol notification message for deleting the monitoring software of the target network equipment;
in addition, on the basis of the foregoing embodiment 1 and/or embodiment 2, when monitoring deployment of the target network device needs to be revoked, a hypertext transfer protocol notification message for deleting monitoring software of the target network device is first received, where the notification message includes IP information of the target network device.
S304, based on the hypertext transfer protocol notification message of the deleted target network equipment monitoring software, deleting the monitoring software of the target network equipment.
And after receiving the hypertext transfer protocol notification message for deleting the monitoring software of the target network equipment, deleting the monitoring software of the target network equipment according to the received deletion message.
It should be noted that, when the monitoring software deployment of the target network device is modified or deleted, the port value of the monitoring software port does not need to be changed.
In summary, the existing monitoring software for the network device cannot be automatically deployed, and the configuration file does not have universality for network devices of different brands and different models. In order to monitor all network devices, it is often necessary for a deployment person to manually configure multiple pieces of monitoring software, which is a cumbersome and time-consuming task. According to the method and the device, automatic deployment of the monitoring software of the network equipment is realized, the working efficiency of operation and maintenance personnel is improved, and the convenience of the deployment of the monitoring software is enhanced.
As shown in fig. 4, a schematic structural diagram of an embodiment 1 of a system for automatically deploying network device monitoring software disclosed in the present application is shown, where the system may include:
a saving module 401, configured to save the basic monitoring parameters of the target network device in a relational database;
when the monitoring software of the network equipment needs to be deployed, firstly, operation and maintenance personnel carry out monitoring configuration according to a target network, configure basic monitoring parameters of the target network equipment, and store the basic monitoring parameters of the target network equipment into a relational database after the operation and maintenance personnel configure the basic monitoring parameters of the target network equipment. It should be noted that the target network device is the network device that needs to deploy the monitoring software.
A first receiving module 402, configured to receive a hypertext transfer protocol notification message of deployment target network device monitoring software;
then, the operation and maintenance personnel send a hypertext transfer protocol notification message for deploying the target network device monitoring software, and the system receives the hypertext transfer protocol notification message for deploying the target network device monitoring software. It should be noted that the received http notification message for deploying the target network device monitoring software may include the IP information of the target network device.
A judging module 403, configured to judge whether monitoring software of a target network device exists based on a hypertext transfer protocol notification message of the deployed monitoring software of the target network device;
after receiving a hypertext transfer protocol notification message for deploying target network equipment monitoring software, pulling a basic monitoring parameter corresponding to the target network equipment from a relational database based on IP information of the target network equipment in the received hypertext transfer protocol notification message for deploying the target network equipment monitoring software, and caching the pulled basic monitoring parameter into a memory; and simultaneously, executing a Linux command, and judging whether the monitoring software with the same brand and model exists according to the information of the monitoring software of the original target network equipment.
A creating module 404, configured to create a new path and new monitoring software for the target network device when the monitoring software for the target network device does not exist;
when monitoring software of the same brand and model does not exist, a new path and monitoring software is created.
A first updating module 405, configured to update configuration information of new monitoring software of the target network device based on the basic monitoring parameters of the target network device;
and then, modifying the configuration information of the newly created monitoring software again according to the basic monitoring parameters of the target network equipment cached in the memory.
A first modification module 406, configured to modify a port value of new monitoring software of the target network device, and add 1 to the port value on the original basis;
and simultaneously reading the port value of the starting port of the original target network equipment monitoring software, adding 1 to the port value and storing the port value, and then taking the self-increased port value as the starting port value of the newly-created monitoring software of the target network equipment. Because port values of ports cannot be the same for programs started on the same server, otherwise, the program start fails due to port conflicts, and therefore, the port conflicts need to be avoided. Repeating the steps, if more monitoring software of the network equipment is created, the port value of the starting port of the original network equipment monitoring software is increased by 1.
The first starting module 407 is configured to start new monitoring software of the target network device.
And after the newly created monitoring software parameters are configured, executing the Linux command again, starting the newly created monitoring software, and finishing the deployment of the new target network equipment monitoring software.
To sum up, in the above embodiment, when the monitoring software of the network device needs to be deployed, first, the basic monitoring parameter of the target network device is saved in the relational database, then, the http notification message for deploying the monitoring software of the target network device is received, whether the monitoring software of the target network device exists is determined based on the http notification message for deploying the monitoring software of the target network device, if not, a new path and new monitoring software of the target network device are created, the configuration information of the new monitoring software of the target network device is updated based on the basic monitoring parameter of the target network device, the port value of the new monitoring software of the target network device is modified, 1 is added to the original port value, and the new monitoring software of the target network device is started. The method and the device for deploying the monitoring software of the network equipment can automatically deploy the monitoring software of the network equipment, and can effectively improve the efficiency of deploying the monitoring software of the network equipment compared with the conventional manual deployment mode.
As shown in fig. 5, a schematic structural diagram of an embodiment 2 of a system for automatically deploying network device monitoring software disclosed in the present application is shown, where the system may include:
a saving module 501, configured to save the basic monitoring parameters of the target network device in a relational database;
when the monitoring software of the network equipment needs to be deployed, firstly, operation and maintenance personnel carry out monitoring configuration according to a target network, configure basic monitoring parameters of the target network equipment, and store the basic monitoring parameters of the target network equipment into a relational database after the operation and maintenance personnel configure the basic monitoring parameters of the target network equipment. It should be noted that the target network device is a network device that needs to deploy monitoring software.
A first receiving module 502, configured to receive a hypertext transfer protocol notification message of deployment target network device monitoring software;
and then, the operation and maintenance personnel send a hypertext transfer protocol notification message for deploying the target network device monitoring software, and the system receives the hypertext transfer protocol notification message for deploying the target network device monitoring software. It should be noted that the received http notification message for deploying the target network device monitoring software may include the IP information of the target network device.
A judging module 503, configured to judge whether monitoring software of a target network device exists based on a hypertext transfer protocol notification message of the deployed monitoring software of the target network device;
after receiving a hypertext transfer protocol notification message for deploying target network equipment monitoring software, pulling a basic monitoring parameter corresponding to the target network equipment from a relational database based on IP information of the target network equipment in the received hypertext transfer protocol notification message for deploying the target network equipment monitoring software, and caching the pulled basic monitoring parameter into a memory; and simultaneously, executing a Linux command, and judging whether the monitoring software with the same brand and model exists according to the information of the monitoring software of the original target network equipment.
A second updating module 504, configured to update configuration information of original monitoring software of the target network device based on a basic monitoring parameter of the target network device when the monitoring software of the target network device exists;
and then, when the monitoring software of the target network equipment exists, revising the configuration information of the existing monitoring software according to the basic monitoring parameters of the target network equipment cached in the memory.
A second modifying module 505, configured to modify a port value of original monitoring software of the target network device, and add 1 to the port value on the original basis;
and meanwhile, reading the port value of the starting port of the original target network equipment monitoring software, adding 1 to the port value and storing the port value, and then taking the self-increased port value as the starting port value of the monitoring software after the configuration information is modified. Because port values of ports cannot be the same for programs started on the same server, otherwise, the program start fails due to port conflicts, and therefore, the port conflicts need to be avoided. Repeating the steps, if more monitoring software of the network equipment is created, the port value of the starting port of the original network equipment monitoring software is increased by 1.
A second starting module 506, configured to start the monitoring software after the target network device updates the configuration information.
And after the configuration information of the original monitoring software is updated, executing the Linux command again, starting the monitoring software, and finishing the deployment of the new target network equipment monitoring software.
To sum up, in the above embodiment, when the monitoring software of the network device needs to be deployed, first, the basic monitoring parameter of the target network device is saved in the relational database, then, the http notification message for deploying the monitoring software of the target network device is received, whether the monitoring software of the target network device exists is determined based on the http notification message for deploying the monitoring software of the target network device, if yes, the configuration information of the original monitoring software of the target network device is updated based on the basic monitoring parameter of the target network device, the port value of the original monitoring software of the target network device is modified, the port value is increased by 1 on the original basis, and the monitoring software of the target network device after updating the configuration information is started. The method and the device for deploying the monitoring software of the network equipment can automatically deploy the monitoring software of the network equipment, and can effectively improve the efficiency of deploying the monitoring software of the network equipment compared with the conventional manual deployment mode.
As shown in fig. 6, a schematic structural diagram of an embodiment 3 of a system for automatically deploying network device monitoring software disclosed in the present application is shown, where the system may include:
a third receiving module 601, configured to receive a hypertext transfer protocol notification message for modifying target network device monitoring software;
on the basis of the foregoing embodiment 1 and/or embodiment 2, when monitoring deployment of a target network device needs to be modified, a hypertext transfer protocol notification message for modifying monitoring software of the target network device is received, where the modification message includes IP information of the target network device.
A modification module 602, configured to modify the monitoring software of the target network device based on a hypertext transfer protocol notification message that modifies the monitoring software of the target network device;
and when receiving a hypertext transfer protocol notification message for modifying the target network equipment monitoring software, modifying the deployment of the target network equipment monitoring software according to the received modification message.
A second receiving module 603, configured to receive a http notification message for deleting the target network device monitoring software;
in addition, on the basis of the foregoing embodiment 1 and/or embodiment 2, when monitoring deployment of the target network device needs to be revoked, a hypertext transfer protocol notification message for deleting monitoring software of the target network device is first received, where the notification message includes IP information of the target network device.
A deleting module 604, configured to delete the monitoring software of the target network device based on deleting the http notification message of the monitoring software of the target network device.
And after receiving the hypertext transfer protocol notification message for deleting the monitoring software of the target network equipment, deleting the monitoring software of the target network equipment according to the received deletion message.
It should be noted that, when the monitoring software deployment of the target network device is modified or deleted, the port value of the monitoring software port does not need to be changed.
In summary, the existing monitoring software for the network device cannot be automatically deployed, and the configuration file does not have universality for network devices of different brands and different models. In order to monitor all network devices, it is often necessary for a deployment person to manually configure multiple pieces of monitoring software, which is a cumbersome and time-consuming task. According to the method and the device, automatic deployment of the monitoring software of the network equipment is realized, the working efficiency of operation and maintenance personnel is improved, and the convenience of the deployment of the monitoring software is enhanced.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.