CN113448793B - System monitoring method and device compatible with multiple operating systems - Google Patents
System monitoring method and device compatible with multiple operating systems Download PDFInfo
- Publication number
- CN113448793B CN113448793B CN202010217802.3A CN202010217802A CN113448793B CN 113448793 B CN113448793 B CN 113448793B CN 202010217802 A CN202010217802 A CN 202010217802A CN 113448793 B CN113448793 B CN 113448793B
- Authority
- CN
- China
- Prior art keywords
- command
- template
- monitoring
- monitored
- command set
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Computer Security & Cryptography (AREA)
- Debugging And Monitoring (AREA)
- Hardware Redundancy (AREA)
Abstract
The application discloses a system monitoring method and device compatible with multiple operating systems, wherein the method is applied to a micro-service cluster comprising at least two servers, and the method comprises the following steps: determining a parent template of the system to be monitored from a template library according to the received selection information; wherein the parent template comprises a first command set that monitors a first system; adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set; the second command set comprises commands for monitoring the system to be monitored. The method and the device solve the technical problem that the monitoring mode of static constant class is not suitable for monitoring the service server in a distributed deployment mode in the prior art.
Description
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a system monitoring method and apparatus compatible with multiple operating systems.
Background
In the prior art, in order to ensure that the micro-service is healthy and stable to run, the network manager is required to monitor all running indexes of a server running the micro-service in real time and modify some parameters of an operating system, and a specific monitoring mode can be to write a set of shell commands for acquiring data and modifying parameters aiming at a version of the operating system of the server deploying the micro-service, so as to acquire index data and modify parameters of a single server.
At present, when the system monitoring is realized, a static constant class is created, and all shell commands which are used for monitoring are written in the constant class, such as shell commands of centos6.9 in the prior art. When the Shell command is needed, the tool class telnet server can be connected through SSH (secure Shell), and then the logged server executes the corresponding command in the static class to obtain the result.
The storage mode for storing shell commands has good support for fixed operating system versions deployed in a single-point centralized mode, and a programmer only needs to establish a static constant class, write all commands to be used into the constant class, remotely connect to a server and execute the commands. The implementation mode is simple and convenient in code writing, and can complete collection of the running index of the server and modification of the parameters of the operating system without loading any configuration file;
however, in order to adapt to the new requirements of operator cloud platform development, the network management service adopts a micro-service architecture to develop, the deployment mode is changed from single-point centralized deployment to multi-point distributed deployment (as shown in fig. 1), multiple servers may exist in one micro-service cluster, and operating systems and versions installed by the servers may be different, so that shell commands for collecting data and modifying parameters are more or less different, but the implementation mode is only advantageous in a fixed operating system version deployed in single-point centralized mode, but the mode lacks the characteristic of "universality", so that the static constant monitoring mode is not applicable to the distributed deployment mode any more.
In the distributed deployment mode, after each operating system change or version upgrade, such as upgrade from centos6.9 to centos7, some shell commands will change; thus, the modification, packaging, testing and new version of the code are required, the maintenance cost is increased, and if two or more operating systems or operating system versions appear in the cluster deployment, the above method cannot realize the execution of shell commands.
Disclosure of Invention
The application provides a system monitoring method and device compatible with multiple operating systems, which are used for solving the technical problem that a static constant class monitoring mode in the prior art is not suitable for monitoring a service server in a distributed deployment mode.
In a first aspect, a system monitoring method compatible with multiple operating systems is provided, and the method is applied to a micro service cluster including at least two servers, and the method includes:
determining a parent template of the system to be monitored from a template library according to the received selection information; wherein the parent template comprises a first command set that monitors a first system;
adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set; the second command set comprises commands for monitoring the system to be monitored.
In the embodiment of the application, the template is adopted to quickly match different operating systems and versions under the condition of not modifying codes, so that index monitoring or parameter modification is carried out on a plurality of different operating systems and versions at the same time. Therefore, the method provided by the embodiment of the application can identify the version of the server, and then acquire the corresponding execution command through the version calling template, so that the method has the advantage of intellectualization; compared with the prior monitoring mode, when the system version is replaced, the code is required to be modified, and only the template is needed to be added, so that the maintenance cost is saved.
An optional implementation manner, before adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set, the method further includes:
and outputting an operation interface based on the first command set, and receiving the adjustment information through the operation interface.
In an alternative embodiment, the at least one command is a command that is different between the first system and the system to be monitored.
An optional implementation manner, after the adjusting at least one command in the first command set according to the received adjusting information to obtain a second command set, the method further includes:
converting all commands in the second command set into JavaBean objects;
and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
In an optional implementation manner, the adjustment information further includes a regular expression corresponding to the at least one command; the regular expression is used for judging whether the result operated after the adjustment of the at least one command is correct or not.
In the example, a regular matching rule is introduced into the template, so that the problem that the return results are different after different operating systems or versions execute commands is solved.
In a second aspect, a system monitoring device compatible with multiple operating systems is provided, the device being applied to a micro service cluster including at least two servers, the device comprising:
the determining module is used for determining a father template of the system to be monitored from the template library according to the received selection information; wherein the parent template comprises a first command set that monitors a first system;
the generation module is used for adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set; the second command set comprises commands for monitoring the system to be monitored.
In an alternative embodiment, the apparatus further comprises:
and the interaction module is used for outputting an operation interface based on the first command set and receiving the adjustment information through the operation interface.
In an alternative embodiment, the apparatus further comprises:
the file module is used for converting all commands in the second command set into JavaBean objects; and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
In a third aspect, a server is provided, where the server includes at least one processor and a memory connected to the at least one processor, where the at least one processor is configured to implement the method steps of the first aspect and any optional implementation manner of the first aspect when executing a computer program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the method steps of the first aspect and any optional implementation manner of the first aspect.
The beneficial effects of the application are as follows:
in the embodiment of the application, the template is adopted to quickly match different operating systems and versions under the condition of not modifying codes, so that index monitoring or parameter modification is carried out on a plurality of different operating systems and versions at the same time. Therefore, the method provided by the embodiment of the application can identify the version of the server, and then acquire the corresponding execution command through the version calling template, so that the method has the advantage of intellectualization; compared with the prior monitoring mode, when the system version is replaced, the code is required to be modified, and only the template is needed to be added, so that the maintenance cost is saved.
Drawings
Fig. 1 is a schematic diagram of a network management server architecture to which the method provided in the embodiment of the present application is applicable;
FIG. 2 is a schematic flow chart of a system monitoring method compatible with multiple operating systems according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a graphical interactive interface provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a system monitoring device compatible with multiple operating systems according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a system monitoring server compatible with multiple operating systems according to an embodiment of the present application.
Detailed Description
The method provided by the embodiment of the application can be applied to the network management server framework shown in fig. 1, and the network management server framework is developed by adopting a micro-service framework in order to adapt to the new requirements of cloud platform of operators, and the deployment mode is changed from single-point centralized deployment to multi-point distributed deployment. The network management server architecture for distributed deployment includes: the system comprises a client, a web server, a plurality of service servers, a system monitoring server and a DB (Database) server, wherein the service servers which can be included in a framework realize distributed deployment of micro services, and the client can acquire data in the DB server through the web server and one of the service servers. In order to ensure the health and stable operation of the micro-service, the network manager requires real-time monitoring and modification of various operation indexes of each server and some parameters of an operating system; in fig. 1, a system monitoring server obtains data of each service server through a set monitoring program and modifies parameters of a system in each service server; in the prior art, if the service server is still another, the system monitoring server can write a set of shell commands for acquiring data and modifying parameters aiming at the version of the operation system of the service server, and acquire index data and modify parameters for a single service server. However, based on the situation that a plurality of service servers exist in the existing micro-service cluster shown in fig. 1, operating systems and versions installed by the plurality of service servers may be different, so that shell commands with collected data and modified parameters are more or less different, and therefore a monitoring mode provided by the prior art is not suitable for a distributed deployment mode any more.
For example, if the system upgrades from centos6.9 to centos7, then a portion of the shell command constant classes of monitoring system centos6.9 may be:
public class LinuxCmd {/View System version information +.
public static final String SYSTEM _release= "cat/etc/system-RELEASE"; viewing ftp State-
public static final String FTP _status= "service vsftpd STATUS"; start-up ftp-
public static final String FTP _start= "service vsftpd START"; stop ftp-
public static final String FTP _stop= "service vsftpd STOP"; viewing ftp user-
If upgrading to centos7, the centos7 constant class part corresponding to centos6.9 described above needs to be modified as:
public class LinuxCmd {/see System version information +.
public static final String SYSTEM _release= "cat/etc/system-RELEASE"; viewing ftp State-
public static final String FTP _status= "systemctl STATUS vsftpd"; start-up ftp-
public static final String FTP _start= "systemctl START vsftpd"; stop ftp-
public static final String FTP _stop= "systemctl STOP vsftpd"; viewing ftp user-
From the above system upgrades it can be concluded that although the system upgrades mentioned in the above examples only change in individual commands, the code modification, packaging, testing, and new versions are still performed, which can increase maintenance costs, if two or more operating systems or operating system versions occur in a cluster deployment, the prior art monitoring methods will not be able to achieve monitoring.
Based on the above problems in the prior art, the embodiment of the present application provides a method, which has the following overall concept:
determining a parent template of the system to be monitored from a template library according to the received selection information; wherein the parent template comprises a first command set that monitors a first system;
adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set; the second command set comprises commands for monitoring the system to be monitored.
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims of this application and in the drawings, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Based on the above prior art problems, in the embodiments of the present application, in consideration of the flexible configuration of the operating system command and compatibility with different operating systems and versions, a system monitoring scheme based on a template is provided, and the method and apparatus provided in the embodiments of the present application are described in further detail below with reference to the accompanying drawings and specific application scenarios:
as shown in fig. 2, an embodiment of the present application provides a system monitoring method compatible with multiple operating systems, where the method is applied to a micro service cluster including at least two servers, and the method includes:
based on the operating systems and versions installed by a plurality of service servers possibly different, shell commands with collected data and parameter modification are more or less different, and the shell commands have a plurality of commonalities although the shell commands are different, so that in the scheme of the application, before monitoring a new system (namely, a system without a corresponding monitoring program before), a template system closest to the new system is selected (the template system has a corresponding monitoring program, and the difference between the template system and the new system is within a set range), and then the monitoring program is correspondingly adjusted and modified on the basis of the template system, so that a program capable of monitoring the new system is generated; the method of this embodiment needs to determine the parent template of the system to be monitored (i.e. the basic system for generating the program for monitoring the new system), and the specific implementation may be:
in the embodiment of the application, in order to improve the efficiency of command adjustment by the user and reduce the difficulty of command modification, a graphical interactive interface convenient for user operation may be provided, and all commands in the first command set may be displayed through the graphical interactive interface, so that the user may determine a specific modification manner through the graphical operation interface with related instructions, and input selection information required to modify the system monitoring command through the graphical interactive interface. The method may further include, before adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set:
and outputting an operation interface based on the first command set, and receiving the adjustment information through the operation interface.
For example, the system defaults to providing a basic command template of centos6.0.xml, the basic template being based on centos6.0 commands (6.0 is a current, more stable and widely used version of centso), the centos6.0 includes partial commands (as shown in FIG. 3: view ftp status, turn on ftp service … … memory usage, etc.).
After selecting a proper parent template and receiving corresponding selection information, a monitoring program capable of monitoring a new system can be obtained through background operation, and specifically can be:
Based on the differences between the systems, in this embodiment, after selecting the appropriate parent template system, the differences between the parent template system and the system to be monitored are determined, and the differences are the differences of the monitoring commands, including the format and parameters of the commands, and so on. The at least one command in this example is a command that is not the same between the first system and the system to be monitored.
Referring to the interface shown in fig. 3, when modification adjustment is required for the command in centos6.0, modification adjustment of the command may be performed by inputting adjustment information in the interface shown in fig. 3. For example, adjusting the "view ftp state", selecting a command line corresponding to the "view ftp state" in the interactive interface shown in fig. 3, and then inputting adjustment information based on a command format or parameters required by the system to be monitored; with reference to the adjustment from centos6.9 to centos7 in the previous example, the shell command to "view ftp status" may be modified from "service vsftpd stop" to "systemctl stop vsftpd";
further, if the operation result of the command is required to be judged, a corresponding regular rule can be input in a "regular matching" column. The method may further comprise:
the adjustment information further comprises a regular expression corresponding to the at least one command; the regular expression is used for judging whether the result operated after the adjustment of the at least one command is correct or not.
Based on the above mode, determining the father template and the difference between the system to be monitored and the template, and determining the content of the system to be monitored, which needs to be adjusted for the father template, then correspondingly generating a program capable of monitoring the system to be monitored through various modes, and in the embodiment of the application, for flexibly obtaining a new monitoring program, generating an xml file based on the second command set; xml files are file types of commonly used stored information in Java, and have the advantages of flexible use and easy content analysis. The specific implementation may be that after the adjusting at least one command in the first command set according to the received adjustment information to obtain a second command set, the method further includes:
converting all commands in the second command set into JavaBean objects;
and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
In order to be compatible with different operating systems and versions, a template mechanism is introduced into the embodiment of the application to establish a template for each monitored operating system version, and the template can be stored in an xml file format; the xml file may include:
list tags, which include all group tags.
Each group label represents a group of labels for collecting a server operation index or server parameter modification, and the labels of the group labels comprise:
the id tag represents a unique designation of the group tag group.
The shell label represents a shell command for the server to run index collection or modify server parameters. For example, if it is required to detect "ftp service status", then the shell label for one is < shell > service vsftpd status </shell >;
the regular label represents regular matching of the command execution return result, and the regular matching is matched with the shell command to obtain a final result; if the tag is empty, it means that regular matching is not required.
The name tag is a description of the basic functions of the shell.
The monitoring system loads an xml file when started, maps each group of group tags into a java bean object and stores the java bean object in a set, and can index the java bean object through a unique mark id when in use.
For example, the monitoring command that needs to be used by a certain system to be monitored includes: the corresponding xml file may be the following:
in this example, all commands to be used by the system monitoring are written to the xml file in the form of the tags described above. An operator can use a basic template or other existing templates as a father template according to specific requirements through an operation interface shown in fig. 3, a new child template named by an operation system and version combination is created, the child template completely inherits the content of the father template, after creation is completed, commands and regulations different from the father template are modified, so that the child template is suitable for a new system to be monitored, and after completion, modification is submitted, a new xml file is generated without modifying codes or publications.
In order to ensure that the monitoring server can acquire the corresponding template file, after the corresponding xml file is generated for each service server in the embodiment of the present application, a system_version file may be created under the monitored server/etc/directory, and the content identical to the template name (combination of the operating system and the version) is written in the file, so that the operating system and the version installed on the server, such as centrosos 6.0, solaris10, etc., are conveniently and uniformly confirmed.
In this application example, if the system monitoring server is to monitor any service server, loading an existing template into a cache (i.e. acquiring and loading an xml file that has been generated into the cache), when the remote connection server executes a command, firstly executing a general command cat/etc/system_version for acquiring an operating system version of a system to be detected, and using a key to acquire a server ip and the acquired operating system version: the value is stored in the cache, and then the corresponding template is selected according to the operating system and version (see the use implementation shown in fig. 3).
Based on the xml file format corresponding to each system, after the interface shown in fig. 3 determines the first shell command to be adjusted, the id tag of the first shell command can be correspondingly determined, then the command to be executed is obtained through the unique id tag, and after the remote login is executed, the final result is obtained through matching by using the corresponding regularization, so that the monitoring of the system to be monitored is realized.
In the embodiment of the application, the template is adopted to quickly match different operating systems and versions under the condition of not modifying codes, so that index monitoring or parameter modification is carried out on a plurality of different operating systems and versions at the same time. Therefore, the method provided by the embodiment of the application can identify the version of the server, and then acquire the corresponding execution command through the version calling template, so that the method has the advantage of intellectualization; compared with the prior monitoring mode, when the system version is replaced, the code is required to be modified, and only the template is needed to be added, so that the maintenance cost is saved.
In addition, a regular matching rule can be introduced into the template, so that the problem that the return results are different after different operating systems or versions execute commands is solved.
The template inheritance mode is realized, so that an operator can modify the newly built child template in a minimized way and can be matched with a new operating system quickly. And the function of monitoring two or more operating systems or versions simultaneously occurs in cluster deployment.
As shown in fig. 4, this embodiment also provides a system monitoring device compatible with multiple operating systems, where the device is applied to a micro service cluster including at least two servers, and the device includes:
a determining module 401, configured to determine a parent template of the system to be monitored from a template library according to the received selection information; wherein the parent template comprises a first command set that monitors a first system;
a generating module 402, configured to adjust at least one command in the first command set according to the received adjustment information to obtain a second command set; the second command set comprises commands for monitoring the system to be monitored.
The at least one command is a command which is different between the first system and the system to be monitored.
In the embodiment of the present application, in order to improve the efficiency of command adjustment by the user and reduce the difficulty of command modification, a graphical interactive interface convenient for user operation may be further provided, where the apparatus further includes:
and the interaction module is used for outputting an operation interface based on the first command set and receiving the adjustment information through the operation interface.
Further, if the operation result of the command is required to be judged, a corresponding regular rule can be input in a "regular matching" column. The adjustment information further includes a regular expression corresponding to the at least one command; the regular expression is used for judging whether the result operated after the adjustment of the at least one command is correct or not.
In the embodiment of the present application, in order to flexibly obtain a new monitor program, an xml file may be generated based on the second command set, and the apparatus may further include:
the file module is used for converting all commands in the second command set into JavaBean objects; and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
Based on the same inventive concept, an embodiment of the present application provides a system monitoring server compatible with multiple operating systems, and please refer to fig. 5, where the server includes at least one processor 502 and a memory 501 connected with the at least one processor, in this embodiment of the present application, a specific connection medium between the processor 502 and the memory 501 is not limited, and fig. 5 is an example where the processor 502 and the memory 501 are connected by a bus 500, the bus 500 is shown in a bold line in fig. 5, and a connection manner between other components is only illustrative, but not limited thereto. Bus 500 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 5 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 501 stores instructions executable by the at least one processor 502, and the at least one processor 502 may execute the steps included in the method for controlling the network data forwarding plane by calling the instructions stored in the memory 501. The processor 502 is a control center of the server, and may connect various parts of the entire server using various interfaces and lines, and implement various functions of the server by executing instructions stored in the memory 501. Alternatively, the processor 502 may include one or more processing units, and the processor 502 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, etc., and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 502. In some embodiments, processor 502 and memory 501 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The memory 501, as a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 501 may include at least one type of storage medium, and may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 501 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 501 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and/or data.
The processor 502 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method for controlling a network data forwarding plane disclosed in connection with the embodiments of the present application may be directly embodied as a hardware processor executing the method, or may be executed by a combination of hardware and software modules in the processor.
By programming the processor 502, the code corresponding to the method for controlling the network data forwarding plane described in the foregoing embodiment may be cured into the chip, so that the chip can execute the steps of the foregoing method for controlling the network data forwarding plane during operation, and how to program the processor 502 is a technology known to those skilled in the art will not be repeated here.
Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the steps of the system monitoring method compatible with a multi-operating system as described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.
Claims (8)
1. A system monitoring method compatible with multiple operating systems, wherein the method is applied to a micro service cluster comprising at least two servers, and the method comprises:
determining a parent template of the system to be monitored from a template library according to the received selection information; the parent template comprises a first command set for monitoring a first system, and the difference between the first system and the system to be monitored is in a set range;
creating a child template corresponding to the system to be monitored based on the parent template, wherein the child template inherits the whole content of the parent template;
adjusting at least one command in the first command set of the sub-template according to the received adjustment information to obtain a second command set; the at least one command is a command different between the first system and the system to be monitored, the second command set comprises a command for monitoring the system to be monitored, the adjustment information comprises a regular expression corresponding to the at least one command, and the regular expression is used for judging whether a result operated after adjustment of the at least one command is correct or not.
2. The method of claim 1, wherein before adjusting at least one command in the first set of commands of the sub-template to obtain the second set of commands based on the received adjustment information, further comprising:
and outputting an operation interface based on the first command set, and receiving the adjustment information through the operation interface.
3. The method of claim 1, wherein after adjusting at least one command in the first command set of the sub-template according to the received adjustment information to obtain the second command set, further comprising:
converting all commands in the second command set into JavaBean objects;
and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
4. A system monitoring device compatible with multiple operating systems, wherein the device is applied to a micro service cluster comprising at least two servers, the device comprising:
the determining module is used for determining a father template of the system to be monitored from the template library according to the received selection information; the parent template comprises a first command set for monitoring a first system, and the difference between the first system and the system to be monitored is in a set range;
the generating module is used for creating a child template corresponding to the system to be monitored based on the parent template, and the child template inherits the whole content of the parent template;
adjusting at least one command in the first command set of the sub-template according to the received adjustment information to obtain a second command set; the at least one command is a command different between the first system and the system to be monitored, the second command set comprises a command for monitoring the system to be monitored, the adjustment information comprises a regular expression corresponding to the at least one command, and the regular expression is used for judging whether a result operated after adjustment of the at least one command is correct or not.
5. The apparatus of claim 4, wherein the apparatus further comprises:
and the interaction module is used for outputting an operation interface based on the first command set and receiving the adjustment information through the operation interface.
6. The apparatus of claim 4, wherein the apparatus further comprises:
the file module is used for converting all commands in the second command set into JavaBean objects; and splicing the JavaBean object into a character string in the form of an xml label, and generating an xml file for monitoring the system to be monitored.
7. A server comprising at least one processor and a memory connected to the at least one processor, the at least one processor being configured to implement the steps of the method of any of claims 1-3 when executing a computer program stored in the memory.
8. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010217802.3A CN113448793B (en) | 2020-03-25 | 2020-03-25 | System monitoring method and device compatible with multiple operating systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010217802.3A CN113448793B (en) | 2020-03-25 | 2020-03-25 | System monitoring method and device compatible with multiple operating systems |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113448793A CN113448793A (en) | 2021-09-28 |
CN113448793B true CN113448793B (en) | 2023-05-30 |
Family
ID=77806880
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010217802.3A Active CN113448793B (en) | 2020-03-25 | 2020-03-25 | System monitoring method and device compatible with multiple operating systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113448793B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114070705A (en) * | 2021-11-16 | 2022-02-18 | 广东九博科技股份有限公司 | Device network management method, medium and device based on command line |
CN114327549A (en) * | 2021-12-27 | 2022-04-12 | 杭州圆规网络科技有限公司 | Compatible control method and device, storage medium, and electronic device |
CN115499336B (en) * | 2022-08-19 | 2024-12-17 | 恒丰银行股份有限公司 | Full life cycle monitoring method, equipment and medium for application system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6789252B1 (en) * | 1999-04-15 | 2004-09-07 | Miles D. Burke | Building business objects and business software applications using dynamic object definitions of ingrediential objects |
CN102710467A (en) * | 2012-06-29 | 2012-10-03 | 北京天地云箱科技有限公司 | Monitoring method and monitoring device |
CN107766205A (en) * | 2017-10-10 | 2018-03-06 | 武汉大学 | A kind of monitoring system and method towards the tracking of micro services invoked procedure |
WO2019005351A1 (en) * | 2017-06-29 | 2019-01-03 | Microsoft Technology Licensing, Llc | Code review rebase diffing |
CN109144869A (en) * | 2018-08-16 | 2019-01-04 | 平安科技(深圳)有限公司 | Automated testing method, device, computer equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7650607B2 (en) * | 2001-06-22 | 2010-01-19 | Invensys Systems, Inc. | Supervisory process control and manufacturing information system application having a layered architecture |
CN104022902A (en) * | 2014-05-30 | 2014-09-03 | 京东方科技集团股份有限公司 | Method and system of monitoring server cluster |
CN104518917A (en) * | 2015-01-26 | 2015-04-15 | 浪潮通信信息系统有限公司 | Automatic server inspection method |
CN107491371B (en) * | 2016-06-13 | 2021-03-16 | 阿里巴巴集团控股有限公司 | Deployment monitoring method and device |
CN107528708A (en) * | 2016-06-21 | 2017-12-29 | 天脉聚源(北京)科技有限公司 | A kind of method and system for arranging Linux server cluster |
CN110618914A (en) * | 2019-09-19 | 2019-12-27 | 中国银行股份有限公司 | Monitoring method, device and system for distributed system cluster |
-
2020
- 2020-03-25 CN CN202010217802.3A patent/CN113448793B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6789252B1 (en) * | 1999-04-15 | 2004-09-07 | Miles D. Burke | Building business objects and business software applications using dynamic object definitions of ingrediential objects |
CN102710467A (en) * | 2012-06-29 | 2012-10-03 | 北京天地云箱科技有限公司 | Monitoring method and monitoring device |
WO2019005351A1 (en) * | 2017-06-29 | 2019-01-03 | Microsoft Technology Licensing, Llc | Code review rebase diffing |
CN107766205A (en) * | 2017-10-10 | 2018-03-06 | 武汉大学 | A kind of monitoring system and method towards the tracking of micro services invoked procedure |
CN109144869A (en) * | 2018-08-16 | 2019-01-04 | 平安科技(深圳)有限公司 | Automated testing method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113448793A (en) | 2021-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9274811B1 (en) | System and method for cloud provisioning and application deployment | |
US11599348B2 (en) | Container image building using shared resources | |
CN113448793B (en) | System monitoring method and device compatible with multiple operating systems | |
CN108229686B (en) | Model training and predicting method and device, electronic equipment and machine learning platform | |
US7366706B2 (en) | Method and apparatus for solution-template based deployment and management of an integration solution | |
US10545775B2 (en) | Hook framework | |
US10956191B2 (en) | Systems and methods for customizing and programming a cloud-based management server | |
CN110908859B (en) | Application service processing method, device, terminal and storage medium | |
CN110109684B (en) | Block chain link point management proxy service installation method, electronic device and storage medium | |
CN111858727A (en) | Multi-data-source data export system and method based on template configuration | |
CN113238795A (en) | Component distribution method, device, electronic equipment, storage medium and program product | |
US10866803B2 (en) | Generating interaction libraries | |
CN113254040A (en) | Front-end framework updating method, device, equipment and storage medium | |
GB2583904A (en) | Commissioning a virtualised network function | |
CN113708971A (en) | Openstack cloud platform deployment method and related device | |
CN118170420A (en) | Code management method, system and computing device | |
CN117667109A (en) | Environment deployment method and device, electronic equipment and storage medium | |
CN117391629A (en) | Micro-service item development method, micro-service item development device, computer equipment and storage medium | |
CN112866049A (en) | Server host index acquisition method and system | |
CN113157308A (en) | Software packaging method, device and system | |
CN114265595B (en) | Cloud native application development and deployment system and method based on intelligent contracts | |
CN115495354A (en) | Unit testing method, device, system and storage medium | |
US20210021464A1 (en) | Generating application-server provisioning configurations | |
CN112698918A (en) | Virtual machine file generation method and device based on construction environment | |
CN118860577B (en) | Method, device, equipment, medium and product for updating status indication information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |