CN112702233A - Java virtual machine JVM cluster monitoring method - Google Patents

Java virtual machine JVM cluster monitoring method Download PDF

Info

Publication number
CN112702233A
CN112702233A CN202011522233.XA CN202011522233A CN112702233A CN 112702233 A CN112702233 A CN 112702233A CN 202011522233 A CN202011522233 A CN 202011522233A CN 112702233 A CN112702233 A CN 112702233A
Authority
CN
China
Prior art keywords
monitoring data
server
zabbix
jmx
monitoring
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
CN202011522233.XA
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.)
Beijing Shouqi Zhixing Technology Co Ltd
Original Assignee
Beijing Shouqi Zhixing Technology 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 Beijing Shouqi Zhixing Technology Co Ltd filed Critical Beijing Shouqi Zhixing Technology Co Ltd
Priority to CN202011522233.XA priority Critical patent/CN112702233A/en
Publication of CN112702233A publication Critical patent/CN112702233A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0681Configuration of triggering conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • 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
    • 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/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a monitoring method for a Java virtual machine JVM cluster, which relates to the field of JVM monitoring, and is characterized in that a zabbix client regularly receives a first monitoring data request instruction sent by a zabbix server, calls a local script according to the monitoring data request instruction, and sends a second monitoring data request instruction to a JMX proxy server, the JMX proxy server receives the monitoring data request instruction and establishes JMX connection with the monitored server by using a keyword key consisting of an IP address and a port number of the monitored server, the JMX connection is used, the JMX proxy server acquires monitoring data from the monitored server, the zabbix client reports the monitoring data to the zabbix server, the zabbix server stores the monitoring data in a monitoring database, a visualization tool grafana is used for acquiring the monitoring data from the zaix server and displaying the monitoring data, the monitoring of a large-scale JVM cluster and real-time alarming according to monitoring indexes are realized, the number of JMX connections is reduced, and resources are saved.

Description

Java virtual machine JVM cluster monitoring method
Technical Field
The invention relates to the field of JVM (Java virtual machine) monitoring, in particular to a Java virtual machine JVM cluster monitoring method.
Background
Since the advent of the Java language, a number of Java Virtual Machine (JVM) monitoring tools have emerged, which fall into two major categories, command line tools and visualization tools.
A command line tool such as jps, executing commands will list the JVMs running on the local system, such as jcmd, which provides jps many of the functions and some other information, such as print JVM stack information; if jstat, the command line tool displays detailed performance statistics for local or remote HotSpot VMs; like jmap, print JVM Stack information; there are of course many other command line tools.
A visualization tool such as the JVitualVM, which is used for viewing the detailed information of the application program on the Java virtual machine; jconsosole, besides viewing detailed information, can also view Managed Beans and other information.
Both command line tools and visualization tools suffer from the following drawbacks:
the tools monitor a certain JVM in a targeted manner, and cannot monitor the JVM clusters at the same time;
the command line tool almost needs to be operated in a production environment, and common developers do not have such high operation authority, so that the efficiency of troubleshooting is greatly reduced.
The current common solution is to use JMX technology, which has the following drawbacks:
(1) a large amount of network resources are occupied, the normal operation of the system is influenced, a new JMX connection is established every time a data request is made, resources are wasted, if the request is large, a large number of JMX connections are generated, the resources of the system are occupied, and the service function of the service is influenced;
(2) the system can only monitor one to one, and has no distributed monitoring capability;
(3) the alarm function is not available, only data can be checked, and the alarm for the found problems cannot be given;
(4) data persistence is not supported, only real-time data is provided, and historical operating conditions cannot be observed;
(5) the functions are dispersed, and a plurality of tools are needed to be used jointly to obtain key data when problems are solved;
(6) data display is not friendly, most tools can only check data under a command line, and the data display is not intuitive;
(7) the use is limited, the related rights of the production environment are required, and the product cannot be opened for numerous developers;
(8) the use is unsafe, the existing monitoring tool is used in the generation environment, and the monitored server side risks being invaded.
Disclosure of Invention
In order to solve the defects of the prior art, an embodiment of the present invention provides a method for monitoring a Java virtual machine JVM cluster, where the method includes the following steps:
the zabbix client regularly receives a first monitoring data request instruction sent by a zabbix server, calls a local script according to the monitoring data request instruction, and sends a second monitoring data request instruction to the JMX proxy server;
the JMX proxy server receives the monitoring data request instruction and establishes JMX connection with the monitored server by using a keyword key consisting of the IP address and the port number of the monitored server;
through the JMX connection, the JMX proxy server end acquires monitoring data from the monitored server end;
the JMX proxy server analyzes the monitoring data, converts the monitoring data into a set format and returns the monitoring data to the zabbix client;
the zabbix client reports the monitoring data to a zabbix server;
the zabbix server stores the monitoring data in a monitoring database;
and acquiring the monitoring data from a zabbix server by utilizing a visualization tool, grafana and displaying the monitoring data.
Preferably, the first monitoring data request instruction and the second monitoring data request instruction have the same content, and both include an IP address and a port number of a monitored service, and a type of monitoring data to be acquired.
Preferably, a connection is established between the JMX proxy server and the zabbix client by adopting a restful style HTTP protocol.
Preferably, after the zabbix client reports the monitoring data to the zabbix server, the method further comprises:
and the zabbix server judges whether the monitoring data is larger than a set threshold value, and if so, sends alarm information to the zabbix client.
The method for monitoring the JVM cluster of the Java virtual machine provided by the embodiment of the invention has the following beneficial effects:
(1) the number of JMX connections is reduced, and resource waste is avoided;
(2) the distributed monitoring capability is provided, thousands of JVMs can be monitored simultaneously, distributed deployment is supported, and if the number of monitored servers is large, only monitoring nodes need to be added;
(3) providing an alarm function, and sending alarm information once the monitoring data is larger than a set threshold value;
(4) monitoring data persistence is provided, historical data of three months can be stored, and whether the resource allocation condition of each service is reasonable or not can be analyzed;
(5) the method has the advantages that multiple tools are aggregated, data which can be obtained through multiple tools such as jss, jstat and jmap in the prior art can be easily and quickly checked by only one system;
(6) the operation condition of the system is dynamically displayed in real time by using an industry-leading visualization tool Grafana, so that data display is clearer, and the display effect is more friendly to users;
(7) the monitoring data is open to all people, so that all developers can know the current running state of the self service and can see the running state without applying complicated operation authorities;
(8) the method has better safety, developers only need to pay attention to monitoring data, and can see the desired data without executing any dangerous commands.
Detailed Description
The present invention will be described in detail with reference to the following embodiments.
The method for monitoring the JVM cluster of the Java virtual machine provided by the embodiment of the invention comprises the following steps:
s101, the zabbix client regularly receives a first monitoring data request instruction sent by the zabbix server, calls a local script according to the monitoring data request instruction, and sends a second monitoring data request instruction to the JMX proxy server.
The zabbix client and the monitored server are deployed on the same machine, and the script is triggered periodically to scan the local JVM.
S102, the JMX proxy server receives the monitoring data request instruction and establishes JMX connection with the monitored server by using a keyword key consisting of the IP address and the port number of the monitored server.
The IP address and the port number of the monitored server are used as keys, after the JMX connection is established between the JMX proxy server and the monitored server for the first time, the JMX connection can enter the connection pool, and when the monitored server is accessed again next time, the JMX connection established for the first time is obtained from the connection pool by using a keyword key consisting of the IP address and the port number of the monitored server, so that the purpose of using one JMX connection for multiple times is realized, and the number of the JMX connections can be reduced.
S103, through the JMX connection, the JMX proxy server is connected with the monitored server to obtain the monitoring data.
In order to ensure that the JMX proxy server JMX-controller is a stateless server, the JMX proxy server only performs data forwarding services for the zabbix server and the monitored server, and does not store any data, the zabbix client can send a request to any JMX proxy server, and the JMX proxy server requests data for the monitored service and returns the data to the zabbix client, thereby completing the mission of the JMX proxy server.
And S104, the JMX proxy server analyzes the monitoring data, converts the monitoring data into a set format and returns the monitoring data to the zabbix client.
Wherein, the converted format is a format supported and easily understood by the zabbix client.
And S105, reporting the monitoring data to the zabbix server by the zabbix client.
And S106, the zabbix server stores the monitoring data in a monitoring database.
The zabbix server stores the monitoring data in the mysql database, and the zabbix server can display the monitoring data, but the display effect is poor, so that a Garafna tool is introduced, and the monitoring data is displayed after the Garafna tool acquires the monitoring data from the zabbix server.
S107, acquiring monitoring data from the zabbix server by using a visualization tool, grafana and displaying the monitoring data.
Optionally, the content of the first monitoring data request instruction is the same as that of the second monitoring data request instruction, and both the first monitoring data request instruction and the second monitoring data request instruction include an IP address and a port number of a monitored service, and a type of monitoring data to be acquired.
Optionally, a connection is established between the JMX proxy server and the zabbix client by using a restful style HTTP protocol.
Optionally, after the zabbix client reports the monitoring data to the zabbix server, the method further includes:
and the zabbix server judges whether the monitoring data is larger than a set threshold value, and if so, sends alarm information to the zabbix client.
After receiving the alarm information, the zabbix client executes a local script, captures key data, packages and sends the data to designated personnel, and meanwhile, the zabbix server gives an alarm in other modes such as mails.
The JVM cluster monitoring method for the Java virtual machine provided by the embodiment of the invention comprises the steps of regularly receiving a first monitoring data request instruction sent by a zabbix server through a zabbix client, calling a local script according to the monitoring data request instruction, sending a second monitoring data request instruction to a JMX proxy server, receiving the monitoring data request instruction by the JMX proxy server, establishing JMX connection with the monitored server by using a keyword key consisting of an IP address and a port number of the monitored server, acquiring monitoring data from the monitored server through the JMX connection, analyzing the monitoring data by the JMX proxy server, converting the monitoring data into a set format and returning the monitoring data to the zabbix client, reporting the monitoring data to the zabbix server by the zabbix client, storing the monitoring data in a monitoring database by the zabbix server, acquiring the monitoring data from the zabbix server by using a visualization tool granana and displaying the monitoring data, the monitoring of the large-scale distributed JVM cluster and the real-time alarm according to the monitoring index are realized, the number of JMX connections is reduced, and resources are saved.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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 above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (6)

1. A Java virtual machine JVM cluster monitoring method is characterized by comprising the following steps:
the zabbix client regularly receives a first monitoring data request instruction sent by a zabbix server, calls a local script according to the monitoring data request instruction, and sends a second monitoring data request instruction to the JMX proxy server;
the JMX proxy server receives the monitoring data request instruction and establishes JMX connection with the monitored server by using a keyword key consisting of the IP address and the port number of the monitored server;
through the JMX connection, the JMX proxy server end acquires monitoring data from the monitored server end;
the JMX proxy server analyzes the monitoring data, converts the monitoring data into a set format and returns the monitoring data to the zabbix client;
the zabbix client reports the monitoring data to a zabbix server;
the zabbix server stores the monitoring data in a monitoring database;
and acquiring the monitoring data from a zabbix server by utilizing a visualization tool, grafana and displaying the monitoring data.
2. The method as claimed in claim 1, wherein the first monitoring data request command and the second monitoring data request command have the same content, and each of the first monitoring data request command and the second monitoring data request command includes an IP address, a port number, and a type of a service to be monitored, and the type of the monitoring data needs to be obtained.
3. The method for monitoring the JVM cluster of the Java virtual machine according to claim 1, wherein a connection is established between the JMX proxy server and the zabbix client by adopting a restful style HTTP protocol.
4. The Java virtual machine JVM cluster monitoring method of claim 1, wherein after zabbix client reports the monitoring data to zabbix server, the method further comprises:
and the zabbix server judges whether the monitoring data is larger than a set threshold value, and if so, sends alarm information to the zabbix client.
5. A computer program product, characterized in that the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-4.
6. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1-4.
CN202011522233.XA 2020-12-21 2020-12-21 Java virtual machine JVM cluster monitoring method Pending CN112702233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522233.XA CN112702233A (en) 2020-12-21 2020-12-21 Java virtual machine JVM cluster monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522233.XA CN112702233A (en) 2020-12-21 2020-12-21 Java virtual machine JVM cluster monitoring method

Publications (1)

Publication Number Publication Date
CN112702233A true CN112702233A (en) 2021-04-23

Family

ID=75509824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522233.XA Pending CN112702233A (en) 2020-12-21 2020-12-21 Java virtual machine JVM cluster monitoring method

Country Status (1)

Country Link
CN (1) CN112702233A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166162A (en) * 2023-04-20 2023-05-26 紫金诚征信有限公司 Visual operation method and device of database and computer readable medium
WO2023241351A1 (en) * 2022-06-14 2023-12-21 中兴通讯股份有限公司 Virtual machine monitoring method and apparatus, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512719A (en) * 2018-03-02 2018-09-07 南京易捷思达软件科技有限公司 A kind of Integrative resource monitoring system based on cloud platform of increasing income
CN108989385A (en) * 2018-06-05 2018-12-11 陈艳 A kind of implementation method based on Zabbix monitoring collection automatic synchronization CMDB
CN109120481A (en) * 2018-09-27 2019-01-01 上海新炬网络信息技术股份有限公司 Method based on Zabbix open source monitor component DCOS container and bosom part
CN110413485A (en) * 2019-08-02 2019-11-05 上海数讯信息技术有限公司 A kind of one-stop Networked Control and Management System and method for based on Zabbix Open Source Platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512719A (en) * 2018-03-02 2018-09-07 南京易捷思达软件科技有限公司 A kind of Integrative resource monitoring system based on cloud platform of increasing income
CN108989385A (en) * 2018-06-05 2018-12-11 陈艳 A kind of implementation method based on Zabbix monitoring collection automatic synchronization CMDB
CN109120481A (en) * 2018-09-27 2019-01-01 上海新炬网络信息技术股份有限公司 Method based on Zabbix open source monitor component DCOS container and bosom part
CN110413485A (en) * 2019-08-02 2019-11-05 上海数讯信息技术有限公司 A kind of one-stop Networked Control and Management System and method for based on Zabbix Open Source Platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAN2HTML: "《Zabbix Documentation》", 19 January 2016 *
谢超群: "基于Zabbix 高校数据中心运维监控平台的建设研究", 《长春大学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023241351A1 (en) * 2022-06-14 2023-12-21 中兴通讯股份有限公司 Virtual machine monitoring method and apparatus, and storage medium
CN116166162A (en) * 2023-04-20 2023-05-26 紫金诚征信有限公司 Visual operation method and device of database and computer readable medium

Similar Documents

Publication Publication Date Title
CN109714192B (en) Monitoring method and system for monitoring cloud platform
US7930381B2 (en) Efficient monitoring of heterogeneous applications
CN109783322A (en) A kind of monitoring analysis system and its method of enterprise information system operating status
US20030135611A1 (en) Self-monitoring service system with improved user administration and user access control
CN109784508A (en) A kind of power grid panorama monitoring operation management method and system based on cloud platform
US20120297059A1 (en) Automated creation of monitoring configuration templates for cloud server images
CN107341044A (en) A kind of distributive data center unified monitoring framework and method
CN110851278A (en) Distribution network automation master station mobile application service management method and system based on micro-service architecture
CN112702233A (en) Java virtual machine JVM cluster monitoring method
CN104283919A (en) Interface invocation system and method
CN107025222A (en) A kind of distributed information log acquisition method and device
CA2838140C (en) Customer experience monitor
AU2015382846A1 (en) Alarm information processing method, related device and system
TW201243617A (en) Cloud computing-based service management system
CN112286774A (en) Operation and maintenance monitoring data display method and device, storage medium and computing equipment
WO2015187001A2 (en) System and method for managing resources failure using fast cause and effect analysis in a cloud computing system
Smith A system for monitoring and management of computational grids
CN106789335B (en) Method and system for processing information
CN114338684A (en) Energy management system and method
CN101677278A (en) Method and system for monitoring availability of network information system
CN111669425B (en) Method for monitoring microservice interface and storage medium
CN110929130B (en) Public security level audit data query method based on distributed scheduling
CN107948001B (en) Intelligent monitoring system and method for industrial network of ship manufacturing workshop
CN110913018A (en) Distributed regulation and control service system
CN114221933B (en) Multi-center multi-activity addressing method, device and system for mobile phone bank

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210423