CN117093327A - Virtual machine program monitoring method, device, equipment and storage medium - Google Patents

Virtual machine program monitoring method, device, equipment and storage medium Download PDF

Info

Publication number
CN117093327A
CN117093327A CN202311085563.0A CN202311085563A CN117093327A CN 117093327 A CN117093327 A CN 117093327A CN 202311085563 A CN202311085563 A CN 202311085563A CN 117093327 A CN117093327 A CN 117093327A
Authority
CN
China
Prior art keywords
program
virtual machine
data
monitoring
address
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.)
Pending
Application number
CN202311085563.0A
Other languages
Chinese (zh)
Inventor
陈跃飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311085563.0A priority Critical patent/CN117093327A/en
Publication of CN117093327A publication Critical patent/CN117093327A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for monitoring a virtual machine program, which can be applied to the technical field of intelligent operation and maintenance. The method comprises the following steps: determining a virtual machine address; according to the virtual machine address, a monitoring client is remotely installed on the virtual machine by adopting an automatic operation and maintenance tool; acquiring application program information on a virtual machine through a monitoring client; collecting the running data of the application program by adopting a data collecting program according to the application program information; and at least partially displaying the operation data by adopting a data display program.

Description

Virtual machine program monitoring method, device, equipment and storage medium
Technical Field
The present invention relates to the field of intelligent operation and maintenance, and in particular, to a method, apparatus, device, medium and program product for monitoring a virtual machine program.
Background
Along with the rapid development of the internet industry, users grow faster and faster, so as to ensure the experience of the users, the performance of the products and the experience of the products are higher and the iteration speed of the products is faster and faster, and a whole-process, standardized, automatic and intelligent monitoring management system needs to be established so as to ensure the experience of the users and the demands of the users. In order to better and more effectively ensure the stable operation of the system after being on line. A reliable and sustainable monitoring mechanism is needed for hardware resources, performance, bandwidth, ports, processes, services and the like of the server, and various data of each day are analyzed statistically, so that performance bottlenecks, potential safety hazards and the like of the server can be reflected timely.
The existing monitoring mode is that java service is deployed firstly, then virtual machine addresses and ports of programs are written into a database configuration file, the java service on the virtual machine is manually combed each time, then the monitoring adding work can be executed, labor is consumed, and the programs are easy to miss. In addition, after a new java service is deployed on the server, adjustment of software configuration is needed manually, so that monitoring work of the virtual machine and the program is performed.
According to the existing monitoring scheme, each step needs to be manually configured, the error rate is high, the condition that a monitoring program is omitted easily occurs, each monitoring step needs to be manually participated, manpower is wasted, and the monitoring cost is increased.
Disclosure of Invention
In view of the foregoing, the present invention provides a virtual machine program monitoring method, apparatus, device, medium, and program product.
According to a first aspect of the present invention, there is provided a virtual machine program monitoring method, comprising: determining a virtual machine address; according to the virtual machine address, a monitoring client is remotely installed on the virtual machine by adopting an automatic operation and maintenance tool; acquiring application program information on a virtual machine through a monitoring client; collecting the running data of the application program by adopting a data collecting program according to the application program information; and at least partially displaying the operation data by adopting a data display program.
According to an embodiment of the present invention, determining the virtual machine address includes: acquiring first configuration files at different moments, wherein the first configuration files are used for storing virtual machine addresses input by a server; and comparing the first configuration files at different moments to determine the virtual machine address.
According to an embodiment of the present invention, remotely installing a monitoring client on a virtual machine using an automated operation and maintenance tool according to a virtual machine address includes: calling an automatic operation and maintenance tool according to the virtual machine address, and establishing communication connection with the virtual machine; encrypting the installation package of the monitoring client to obtain an encrypted installation package; and adopting a remote communication protocol to send the encrypted installation package to the virtual machine, and carrying out decryption installation.
According to an embodiment of the present invention, acquiring program information on a virtual machine by a monitoring client includes: and the monitoring client performs timing retrieval on the virtual machine to acquire the address and the port of the program.
According to an embodiment of the present invention, collecting operation data of a program using a data collection program according to program information includes: writing the address and port of the program into a second configuration file of the data collection program; according to the second configuration file, the running data of the program are collected regularly; the operational data is stored in a database.
According to an embodiment of the present invention, at least partially exposing operational data using a data exposure program includes: establishing a server monitoring list template and a server detailed information monitoring template; according to the server monitoring list template, at least partial real-time operation data are acquired at fixed time; and/or monitoring the template according to the server detailed information to obtain at least part of accumulated operation data; and displaying the real-time operation data and/or the accumulated operation data.
According to an embodiment of the present invention, the at least partial presentation of the operation data using the data presentation program further comprises: building jvm monitoring templates; according to jvm, monitoring the template, and periodically acquiring at least part of data of a single program; at least a portion of the data of a single program is presented.
According to an embodiment of the present invention, a virtual machine program monitoring method is used for monitoring at least one cluster composed of a plurality of virtual machines.
A second aspect of the present invention provides a virtual machine program monitoring apparatus, including: the determining module is used for determining the virtual machine address; the installation module is used for remotely installing the monitoring client on the virtual machine by adopting an automatic operation and maintenance tool according to the virtual machine address; the acquisition module is used for acquiring application program information on the virtual machine through the monitoring client; the collection module is used for collecting the operation data of the application program by adopting a data collection program according to the application program information; and the display module is used for at least partially displaying the operation data by adopting a data display program.
A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
A fourth aspect of the invention also provides a computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the above method.
The fifth aspect of the invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the virtual machine program monitoring method, device, equipment, medium and program product provided by the invention, the remote monitoring client is installed on the virtual machine through the automatic operation and maintenance tool, the monitoring client is used for acquiring information such as a port and an address of a newly-added program and returning the program information to a configuration file of a data collection program, so that the running information of the monitored program can be collected through the data collection program, and the automatic display of the running information of the monitored program is realized by combining with the data display program. After the operation and maintenance personnel inputs the virtual machine address, the automatic deployment of the monitoring program and the automatic monitoring and displaying of the operation data of the monitored program can be realized only by combining an automatic operation and maintenance tool, a data collection program and a data display program according to the virtual machine address, so that the technical problems of high manual operation error rate and high cost are at least partially solved, and the technical effects of improving the monitoring efficiency and reliability of the operation program on the virtual machine are realized.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a virtual machine program monitoring method, apparatus, device, medium and program product according to an embodiment of the invention;
FIG. 2 schematically illustrates a flow chart of a virtual machine program monitoring method according to an embodiment of the invention;
FIG. 3 schematically illustrates a flow diagram of a method of determining virtual machine addresses, in accordance with an embodiment of the present invention;
FIG. 4 schematically illustrates a flow diagram of a method of installing a monitoring client on a virtual machine, in accordance with an embodiment of the present invention;
FIG. 5 schematically illustrates a method flow diagram for collecting operational data of a program according to an embodiment of the invention;
FIG. 6 schematically illustrates a method flow diagram for at least partially exposing operational data in accordance with an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow chart of a method of at least partially presenting operational data in accordance with another embodiment of the present invention;
FIG. 8 schematically illustrates a block diagram of a virtual machine program monitoring apparatus according to an embodiment of the present invention; and
fig. 9 schematically shows a block diagram of an electronic device adapted to implement the virtual machine program monitoring method according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the invention, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all meet the requirements of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
The embodiment of the invention provides a virtual machine program monitoring method, which comprises the following steps: determining a virtual machine address; according to the virtual machine address, a monitoring client is remotely installed on the virtual machine by adopting an automatic operation and maintenance tool; acquiring application program information on a virtual machine through a monitoring client; collecting the running data of the application program by adopting a data collecting program according to the application program information; and at least partially displaying the operation data by adopting a data display program.
Fig. 1 schematically illustrates an application scenario diagram of a virtual machine program monitoring method, apparatus, device, medium and program product according to an embodiment of the invention.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like. The operation and maintenance personnel can input the address of the virtual machine to be monitored through the first terminal device 101, the second terminal device 102 and the third terminal device 103.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device. The server 105 may be a platform for installing a plurality of virtual machines, and may provide operation and maintenance services for the virtual machines, operation data acquisition for running programs or services on the virtual machines, and the like.
It should be noted that, the method for monitoring a virtual machine program according to the embodiment of the present invention may be generally executed by the server 105. Accordingly, the virtual machine program monitoring apparatus provided in the embodiments of the present invention may be generally disposed in the server 105. The virtual machine program monitoring method provided by the embodiment of the present invention may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the virtual machine program monitoring apparatus provided by the embodiment of the present invention may be disposed in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Anstable: the automated operation and maintenance tool based on python development only needs to install an client program at a server, does not need to install a client program at each client, remotely manages a client server in an OpenSSH mode, and realizes batch data configuration, batch equipment deployment and batch command execution based on modules.
OpenSSH protocol: is a free open source implementation of the SSH (Secure SHell) protocol. The SSH family of protocols may be used to remotely control or transfer files between computers. Traditional ways of achieving this function, such as telnet (terminal emulation protocol), rcp ftp, rlogin, rsh, are extremely insecure and use plaintext to transfer the password. OpenSSH provides a server daemon and client tool to encrypt data during remote control and file transfer and thereby replace the original similar service.
Prometheus: the system is an open-source system monitoring and alarming system, is added to the CNCF foundation now, becomes a second item hosted in the CNCF after k8s, is usually monitored by matching with prometaus in a kubernetes container management system, supports various exporters to collect data, supports pushgateway to report data, and has enough prometaus performance to support clusters of tens of thousands of scales.
Node_exporter: node_exporter is one of the most commonly used exporters, and can be considered as a agent (client), which needs to be installed on top of the operating system before the data of the system can be collected. Collecting the exor of the Linux class is called node_exor, and if the method is operated by using the sidecar mode, the information of the pod can be collected.
Grafana: the method is an open source application written in go language, is mainly used for visual display of large-scale index data, is the most popular time sequence data display tool in network architecture and application analysis, and currently supports most of common time sequence databases.
The virtual machine program monitoring method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 7 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a virtual machine program monitoring method according to an embodiment of the invention.
As shown in fig. 2, the virtual machine program monitoring method of this embodiment includes, for example, operations S210 to S250.
In operation S210, a virtual machine address is determined.
In operation S220, the monitoring client is remotely installed on the virtual machine using an automated operation and maintenance tool according to the virtual machine address.
In operation S230, application information on the virtual machine is acquired by the monitoring client.
In operation S240, the data collection program is used to collect the operation data of the application program according to the application program information.
In operation S250, the operation data is at least partially displayed using the data display program.
For example, one virtual machine program monitoring method may be for monitoring the performance and running status of virtual machines running on a cloud server. For example, a company deploys multiple virtual machines on a cloud server using virtualization technology, the multiple virtual machines making up at least one cluster. The method can monitor the running condition of each virtual machine in real time.
First, the virtual machine address is determined, i.e., the IP address or other identifier of each virtual machine is determined. Then, according to the virtual machine addresses, the monitoring clients are installed on each virtual machine remotely by adopting an automatic operation and maintenance tool. The monitoring client may be a lightweight program for communicating with the virtual machine and for data collection. By monitoring the client, program information on the virtual machine, such as running processes, CPU and memory usage, etc., can be obtained. According to the program information, a data collection program can be used to collect running data of programs on the virtual machine, such as CPU utilization rate, memory occupation and the like of each process. Finally, the collected operation data is at least partially displayed by adopting a data display program, such as a chart, a report or a real-time monitoring panel is generated, so that an administrator or a user can intuitively know the operation condition of the virtual machine.
For example, the virtual machine address is the address of the virtual machine that requires remote monitoring maintenance by an operation and maintenance person. The operation and maintenance personnel can monitor the plurality of virtual machines remotely through the monitoring server. The monitoring server is provided with an automatic operation tool (such as an existing program), a search program (such as Java service) and a data acquisition program (such as Prometaus program and Grafana program) and the like. When a virtual machine monitoring task needs to be newly added, an operation and maintenance person only needs to input the address of the virtual machine to a monitoring server, so that automatic monitoring of a newly added program (such as Java service) on the monitored virtual machine can be realized, labor cost is saved, and monitoring omission caused by manual operation is reduced.
It will be appreciated that in addition to the combination of the above-described secure program, prometaus program, grafana program, the monitoring of the virtual machine program may also be performed by a combination of other automated operation and maintenance tools, data collection programs, data presentation programs, and the like.
For example, the network traffic can also be monitored and analyzed through Cacti, remote network equipment and related information can be obtained through SNMP protocol, and data display can be performed through Nginx. Cacti is a set of network traffic monitoring graph analysis tools developed based on PHP, mySQL, SNMP and RRDTool. The act is a PHP program, and the remote network device and related information are obtained by using SNMP protocol (for example, obtained by using snmpget and snmpwalk commands of Net-SNMP software package), and are drawn by RRDTOOL tool, and finally are revealed by the PHP program. The state or performance trend graph of the monitored object over a period of time can be presented through Cacti.
For example, monitoring of virtual machine programs may also be implemented by Ganglia. Ganglia is an expandable distributed monitoring system designed for HPC (high performance computing) clusters, which can monitor and display state information of each node in the cluster, collect data in aspects of CPU, memory, hard disk utilization, I/O load, network traffic condition and the like by a gmond daemon running on each node, then summarize the data under the gmetad daemon, store the data by using rrdtool, and finally present historical data in a curve mode through PHP pages.
The Ganglia monitoring system consists of three parts, gmond, gmetad, webfrontend respectively. gmond is installed on a client needing to collect data, gmetad is a server, webfront is a web ui interface of php, and ganglia collects data through gmond and then displays the data in webfront. The data can be transmitted in a TCP or UDP mode, and the data is displayed through the ganlia-web. For example, ganglia stores data in a mysql database, develops an interface through the ganlia-web, can link to the mysql database, and queries the database for the data to be displayed, such as CPU, memory, disk, and network bandwidth usage, through sql statements. An html interface is developed through the ganlia-web, and data queried through sql is displayed on the interface.
The main feature of Ganglia is to collect data and to present the data centrally. The ganglia can collect all data to one interface for centralized display, supports various data interfaces and can conveniently expand monitoring. Meanwhile, the data collected by the ganglia is very light, the gmond program of the client does not consume system resources basically, and the characteristic just makes up the deficiency of zabbix consumption performance. The Ganglia monitors the big data platform more intelligently, and only one configuration file is needed to open the Ganglia to monitor hadoop and spark, so that the monitoring indexes are nearly thousands, and the monitoring requirements on the big data platform are completely met.
FIG. 3 schematically illustrates a flow chart of a method of determining virtual machine addresses according to an embodiment of the invention.
For example, as shown in fig. 3, the virtual machine address can be determined by steps S311 to S312.
Step S311, obtaining first configuration files at different moments, wherein the first configuration files are used for storing virtual machine addresses input by a server.
Step S312, the virtual machine address is determined by comparing the first configuration files at different moments.
For example, the first profile may be a system hosts profile. After the operation and maintenance personnel acquire the address of the virtual machine to be monitored, the new virtual machine address can be input into the web interface. After the virtual machine address is entered, the new address is stored in the Hosts configuration file of the active program. The Anstable program compares the new Hosts configuration file with the old Hosts configuration file through a diff comparison algorithm, and can find a new virtual machine address input by an operation and maintenance person. The newly added virtual machine addresses are stored in the hosts files, and the hosts files at different moments are compared through diff comparison algorithm, so that the newly added virtual machine to be monitored can be automatically found in time.
It should be noted that the automation operation tool may also be jenkins, saltStack, puppet, a server message processing program based on Apache MINA, or the like.
FIG. 4 schematically illustrates a flow diagram of a method of installing a monitoring client on a virtual machine, in accordance with an embodiment of the invention.
For example, as shown in fig. 4, the monitoring client can be installed on the virtual machine through steps S421 to S423.
Step S421, calling an automatic operation and maintenance tool according to the virtual machine address, and establishing communication connection with the virtual machine.
For example, the virtual machine program monitoring system calls an active program, remotely performs three-way handshake with the virtual machine to be monitored by adopting an OpenSSH protocol according to the virtual machine address, and establishes a transmission channel.
Step S422, encrypt the installation package of the monitoring client to obtain an encrypted installation package.
For example, the exporter program may be a Node exporter program, which is used to collect service information of Linux class. And calling the Node exporter program, and encrypting the Node exporter installation package to obtain an encrypted installation package.
Step S423, the encrypted installation package is sent to the virtual machine by adopting a remote communication protocol, and decryption installation is carried out.
For example, calling an exporter program, encrypting an exporter installation package by a client tool provided by an OpenSSH protocol, sending the encrypted installation package to a virtual machine to be monitored through a transmission channel, decrypting the encrypted exporter installation package on the virtual machine to be monitored, and remotely executing the installation of an exporter client. Remote installation of the monitoring client on the virtual machine can be realized by calling the exporter program and combining with the OpenSSH protocol, and the installation package is encrypted, so that the safety of data transmission is improved.
It should be noted that the remote communication protocol may also be a transmission protocol based on TCP/IP, HTTP protocol of restful style, SNMP protocol, transmission protocol based on TCP or UDP, SSH protocol, etc.
For example, the monitoring client is an exporter client. The virtual machine can be searched at regular time through the exporter, and the address and the port of the program are obtained. The program may be, for example, a Java service or the like. The conventional method performs a function of 'search program' (i.e. exporter program) once every 1 minute through a timing task, and the 'search program' remotely detects a newly deployed program on a virtual machine through an OpenSSH protocol, and if the newly deployed program is found, the address and port of the program are returned to the 'search program'. The virtual machine is searched at regular time through the exporter program, so that the address and port information of the newly added program or service can be found in time, and the automatic monitoring of the program or service is realized.
For example, the active program sends a retrieve command to traverse virtual machine ports and processes. It can be agreed that the range of the port is 30000-40000, only the port in the range is traversed, the temporary generated file 20230629175501 records the port information traversed last time, and the newly added program or service can be found by comparing the port information acquired in real time with the port information traversed last time.
Fig. 5 schematically shows a flow chart of a method of collecting operational data of a program according to an embodiment of the invention.
For example, as shown in fig. 5, the operation data of the program can be collected in steps S541 to S543.
In step S541, the address and port of the program are written into the second configuration file of the data collection program.
For example, the data collection program is Prometheus. After the exor program is successfully installed and started, a success identifier is returned, after the exor program retrieves a new program or service, the exor program writes the address and port information of the new program or service into a configuration file of Prometaus, and the monitored data is obtained through the Prometaus.
For example, the running data of the program or service includes the name of the program or service, the port, the IP address, the acquisition time, the application system in which the service is located, the service state (normal or abnormal), and the like. When the service state is found to be abnormal, an alarm can be given, and the service can be processed and modified.
In step S542, the running data of the program is collected periodically according to the second configuration file.
For example, prometaus sets a time interval according to the address and port information of a new program or service in the configuration file, and actively acquires new virtual machine monitoring data. For example, an instruction to acquire monitoring information is issued to the virtual machine every 30s to acquire monitored data. The collected program address and port are written into the configuration file of the Prometaus program by the exporter program, so that the Prometaus program can automatically acquire the program running data.
Step S543, storing the operation data in the database.
For example, after the monitored program data is obtained, the data is stored in a database. The database may be a TSDB database, a MySQL database, an ES database, or the like. The data stored in the TSDB database is compressed, so that the storage space occupied by the data can be saved, and the stored contents are arranged in a time sequence manner, thereby being beneficial to improving the retrieval speed. The MySQL database may customize tables and fields. The ES database is beneficial to realizing the rapid retrieval of a large amount of data.
For example, the promethaus program may be replaced with the zabbix monitor program to collect program operational data. The zabbix monitor may operate under client-side limited, disallowed communication via the OpenSSH protocol, and may obtain data directly from the port via the zabbix program. In addition, the zabbix program also has good data compression performance and strong compatibility with MySQL database.
It should be noted that the data collection procedure may further include, but is not limited to:
nagios: a widely used open source monitoring system can collect operation data on a virtual machine through a plug-in unit and provide alarm and notification functions.
Datadog: a cloud native monitoring and analyzing platform can collect index data of a virtual machine through an agent program and provide visualization and alarm functions.
Telegraf: an open source data collection agent may collect performance index data for the virtual machine and send it to a different target, such as InfluxDB, prometheus.
Sensu: an open source framework for monitoring and collecting index data can collect the running data of the virtual machine through the plug-in unit and provide alarming and notification functions.
Collectd: a lightweight data collection daemon may collect performance index data for the virtual machine and send it to a different target, such as Graphite, influxDB.
Fluentd: an open source log collection and forwarding tool may collect log data for virtual machines and send it to different targets, such as Elasticsearch, kafka, etc.
Sysdig: and the commercial software for monitoring the container and cloud environment can collect the performance index of the virtual machine and the data of the container in running and provide the functions of real-time monitoring and security audit.
New Relic: a cloud native application performance monitoring tool can collect performance indexes and application program data of a virtual machine and provide real-time monitoring and analysis functions.
FIG. 6 schematically illustrates a flow chart of a method of at least partially exposing operational data in accordance with an embodiment of the present invention.
For example, as shown in fig. 6, the operation data may be at least partially displayed through steps S651 to S654.
Step S651, a server monitoring list template and a server detailed information monitoring template are established.
For example, the server monitor list template is used to collect real-time program running data, including, for example, IP address, host name, system running time, machine memory size, total number of CPUs, system load (disk usage over time, I/O performance), CPU usage, memory usage, disk partition usage, disk read speed, disk write speed, TCP link number, download bandwidth, upload bandwidth, etc. The server detailed information monitoring template is used for collecting the historical accumulated value of the program running data within a certain time range (such as 1 day).
Step S652, periodically acquiring at least a portion of the real-time operational data based on the server monitor list template. And/or
Step S653, the template is monitored according to the server detailed information, and at least part of the accumulated operation data is obtained.
In step S654, the real-time operation data and/or the accumulated operation data are displayed.
For example, grafana program is adopted to at least partially display operation data, and data of Prometaus is obtained once every 30s through a built-in server monitoring list template and a server detailed information monitoring template and is pushed to a web end to perform interface display work. By establishing an acquisition template of real-time operation data and an acquisition template of accumulated operation data, the customized automatic display of the data can be realized.
Fig. 7 schematically illustrates a flow chart of a method of at least partially exposing operational data in accordance with another embodiment of the present invention.
For example, as shown in fig. 7, the operation data may be at least partially displayed by steps S751 to S753.
Step S751, build jvm monitoring template.
For example, the jvm monitoring template is a data acquisition template for a single Java service, and includes the start-up time of the service, the number of threads processed, and the like, in addition to the above-described program running data.
Step S752, periodically acquiring at least part of the data of the single program according to the jvm monitoring template.
Step S753, at least part of the data of the single program is displayed.
For example, grafana program monitors the template through jvm, obtains data of Prometheus once every 30s, and pushes the data to the web side for interface display work. By establishing an operation data acquisition template of the single service, the automatic display of the operation state of the single service can be realized.
For example, the zabbix monitor program may be used in place of the Grafana program to at least partially present the operational data.
It should be noted that the data presentation program may further include, but is not limited to:
PowerBI: a business intelligence tool can visualize performance indicators and log data of virtual machines and provide interactive reports and dashboards.
Tableau: a business intelligence and data visualization tool can expose performance metrics and log data of virtual machines and provide highly customized visualization reports.
Graylog: an open-source log management and analysis platform can display log data of the virtual machine and provide searching, filtering and alarming functions.
Chronogram f: an open source tool for data visualization and monitoring dashboards, typically used in conjunction with InfinixDB, can expose performance metrics and log data for virtual machines.
Grafana Loki: an open source tool for log aggregation and visualization may expose log data of virtual machines and provide search and filtering functions.
Netdata: an open source tool for real-time performance monitoring and visualization can display performance index data of the virtual machine and provide real-time chart and alarm functions.
Kibana: an open source tool for data visualization, typically used in conjunction with an elastic search, may expose log and index data for the virtual machine.
Splunk: commercial software for log analysis and visualization can search, analyze and visualize the log and index data of the virtual machine.
ELK Stack: an open source tool combination consisting of Elasticsearch, logstash and Kibana may be used to collect, process and expose log and index data for virtual machines.
It will be appreciated that these specific implementations commonly use a remote communication protocol to interact with the virtual machine, use a data collection program to collect running data of the virtual machine, and use a data presentation program to visually present the data. Therefore, an administrator can monitor and manage the virtual machine in real time through the methods, so that potential performance problems can be found and solved in time, and the stability and reliability of the system are improved.
However, there are also some differences between these methods:
function and characteristics: different data collection programs and data presentation programs have different functions and characteristics. For example, prometheus is a powerful time series database suitable for large scale index data collection and storage; grafana provides rich visualization and dashboard customization functions; ELK Stack is then focused on the collection, processing and presentation of log data. Thus, better functions and characteristics can be obtained by selecting an appropriate program according to specific needs.
Configuration and deployment: different programs may differ in configuration and deployment. Some programs may require more complex configurations and arrangements, while some programs may be easier to deploy and use. Depending on the skill level of the administrator and the requirements of the system. Some programs may provide more friendly user interfaces and documents to assist administrators in configuration and deployment.
Ecosystem and community support: different programs possess different ecosystems and community support. Some programs possess a vast community of users and an active community of developers, providing rich plug-ins, extensions, and support resources. This may provide more options and support for the administrator to meet specific needs.
Commercial and open source: these methods have both commercial and open source software. Commercial software typically provides more comprehensive functionality and support, but may require a paid license. Open source software is usually free and flexible to customize and expand. Depending on the budget and requirements, the appropriate software type is selected.
Thus, depending on the particular situation and requirements, a suitable combination of programs may be selected to achieve the best monitoring results.
Based on the virtual machine program monitoring method, the invention also provides a virtual machine program monitoring device. The virtual machine program monitoring apparatus will be described in detail with reference to fig. 8.
Fig. 8 schematically shows a block diagram of a virtual machine program monitoring apparatus according to an embodiment of the present invention.
As shown in fig. 8, the virtual machine program monitoring apparatus 800 of this embodiment includes, for example: a determination module 810, an installation module 820, an acquisition module 830, a collection module 840, and a presentation module 850.
The determining module 810 is configured to determine a virtual machine address. In an embodiment, the determining module 810 may be configured to perform the operation S210 described above, which is not described herein.
The installation module 820 is configured to remotely install the monitoring client on the virtual machine using an automated operation and maintenance tool according to the virtual machine address. In an embodiment, the installation module 820 may be used to perform the operation S220 described above, which is not described herein.
The acquiring module 830 is configured to acquire application information on the virtual machine through the monitoring client. In an embodiment, the obtaining module 830 may be configured to perform the operation S230 described above, which is not described herein.
The collection module 840 is configured to collect operating data of an application program using a data collection program according to application program information. In an embodiment, the collecting module 840 may be used to perform the operation S240 described above, which is not described herein.
The display module 850 is configured to at least partially display the operation data using a data display program. In an embodiment, the presentation module 850 may be used to perform the operation S250 described above, which is not described herein.
Any of the determining module 810, the installing module 820, the acquiring module 830, the collecting module 840, and the presenting module 850 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the determination module 810, the installation module 820, the acquisition module 830, the collection module 840, and the presentation module 850 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or by hardware or firmware, such as any other reasonable means of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the determination module 810, the installation module 820, the acquisition module 830, the collection module 840, and the presentation module 850 may be at least partially implemented as computer program modules that, when executed, perform the corresponding functions.
Fig. 9 schematically shows a block diagram of an electronic device adapted to implement the virtual machine program monitoring method according to an embodiment of the invention.
As shown in fig. 9, an electronic device 900 according to an embodiment of the present invention includes a processor 901 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. Processor 901 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the invention.
In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM 902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs that, when executed, implement the virtual machine program monitoring method according to an embodiment of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM 902 and/or RAM 903 and/or one or more memories other than ROM 902 and RAM 903 described above.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the virtual machine program monitoring method provided by the embodiments of the present invention.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 901. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, via communication portion 909, and/or installed from removable medium 911. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the invention can be combined in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the present invention. In particular, the features recited in the various embodiments of the invention can be combined and/or combined in various ways without departing from the spirit and teachings of the invention. All such combinations and/or combinations fall within the scope of the invention.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.

Claims (12)

1. A virtual machine program monitoring method, comprising:
determining a virtual machine address;
according to the virtual machine address, a monitoring client is remotely installed on the virtual machine by adopting an automatic operation and maintenance tool;
acquiring application program information on the virtual machine through the monitoring client;
Collecting the operation data of the application program by adopting a data collection program according to the application program information; and
and at least partially displaying the operation data by adopting a data display program.
2. The method of claim 1, the determining a virtual machine address comprising:
acquiring first configuration files at different moments, wherein the first configuration files are used for storing virtual machine addresses input by a server;
and comparing the first configuration files at different moments to determine the virtual machine address.
3. The method of claim 2, wherein the remote installation of the monitoring client on the virtual machine using an automated operation tool according to the virtual machine address comprises:
calling the automatic operation and maintenance tool according to the virtual machine address, and establishing communication connection with the virtual machine;
encrypting the installation package of the monitoring client to obtain an encrypted installation package;
and transmitting the encrypted installation package to the virtual machine by adopting a remote communication protocol, and performing decryption installation.
4. The method of claim 3, the obtaining, by the monitoring client, program information on the virtual machine comprising:
and carrying out timing retrieval on the virtual machine through the monitoring client to acquire the address and the port of the program.
5. The method of claim 4, wherein the collecting, with a data collection program, operational data of the program according to the program information comprises:
writing the address and port of the program into a second configuration file of the data collection program;
according to the second configuration file, the operation data of the program are collected regularly;
storing the operational data in a database.
6. The method of claim 1, the employing a data presentation program to at least partially present the operational data comprising:
establishing a server monitoring list template and a server detailed information monitoring template;
according to the server monitoring list template, at least partial real-time operation data are obtained at fixed time; and/or
Monitoring a template according to the server detailed information to obtain at least part of accumulated operation data;
and displaying the real-time operation data and/or the accumulated operation data.
7. The method of claim 6, the employing a data presentation program to at least partially present the operational data further comprising:
building jvm monitoring templates;
periodically acquiring at least part of data of a single program according to the jvm monitoring template;
At least a portion of the data for a single said program is presented.
8. A method according to any of claims 1-7 for monitoring at least one cluster of a plurality of virtual machines.
9. A virtual machine program monitoring apparatus comprising:
the determining module is used for determining the virtual machine address;
the installation module is used for remotely installing the monitoring client on the virtual machine by adopting an automatic operation and maintenance tool according to the virtual machine address;
the acquisition module is used for acquiring the application program information on the virtual machine through the monitoring client;
the collection module is used for collecting the operation data of the application program by adopting a data collection program according to the application program information; and
and the display module is used for at least partially displaying the operation data by adopting a data display program.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202311085563.0A 2023-08-25 2023-08-25 Virtual machine program monitoring method, device, equipment and storage medium Pending CN117093327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311085563.0A CN117093327A (en) 2023-08-25 2023-08-25 Virtual machine program monitoring method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311085563.0A CN117093327A (en) 2023-08-25 2023-08-25 Virtual machine program monitoring method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117093327A true CN117093327A (en) 2023-11-21

Family

ID=88774801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311085563.0A Pending CN117093327A (en) 2023-08-25 2023-08-25 Virtual machine program monitoring method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117093327A (en)

Similar Documents

Publication Publication Date Title
US20230177047A1 (en) Using worker nodes to process results of a subquery
US20220156335A1 (en) Streaming data processing
US11615104B2 (en) Subquery generation based on a data ingest estimate of an external data system
US11663227B2 (en) Generating a subquery for a distinct data intake and query system
US11281706B2 (en) Multi-layer partition allocation for query execution
US11232100B2 (en) Resource allocation for multiple datasets
US11163758B2 (en) External dataset capability compensation
US10726009B2 (en) Query processing using query-resource usage and node utilization data
US11416528B2 (en) Query acceleration data store
US11461334B2 (en) Data conditioning for dataset destination
US10795884B2 (en) Dynamic resource allocation for common storage query
US10698897B2 (en) Executing a distributed execution model with untrusted commands
US9246773B2 (en) System, method, and graphical user interface for application topology mapping in hosted computing environments
US9712410B1 (en) Local metrics in a service provider environment
CN111190888A (en) Method and device for managing graph database cluster
US20140280912A1 (en) System and method for determination and visualization of cloud processes and network relationships
CN113760641A (en) Service monitoring method, device, computer system and computer readable storage medium
CN111949484B (en) Information processing method, device, electronic equipment and medium
US11853383B2 (en) Systems and methods for generating a snapshot view of virtual infrastructure
CN112328448A (en) Zookeeper-based monitoring method, monitoring device, equipment and storage medium
US10476766B1 (en) Selecting and configuring metrics for monitoring
US20230031872A1 (en) Enhanced platform and processes for scalability
CN109324892B (en) Distributed management method, distributed management system and device
US9218205B2 (en) Resource management in ephemeral environments
US11556120B2 (en) Systems and methods for monitoring performance of a building management system via log streams

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