CN110874300A - Method and device for monitoring equipment - Google Patents
Method and device for monitoring equipment Download PDFInfo
- Publication number
- CN110874300A CN110874300A CN201810996060.1A CN201810996060A CN110874300A CN 110874300 A CN110874300 A CN 110874300A CN 201810996060 A CN201810996060 A CN 201810996060A CN 110874300 A CN110874300 A CN 110874300A
- Authority
- CN
- China
- Prior art keywords
- monitoring
- information
- monitored
- equipment
- monitoring device
- 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.)
- Granted
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 117
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012806 monitoring device Methods 0.000 claims description 38
- 238000003860 storage Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 7
- 238000004519 manufacturing process Methods 0.000 abstract description 10
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000003384 imaging method Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 238000007726 management method Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000000835 fiber Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013024 troubleshooting Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/301—Monitoring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/328—Computer systems status display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computer Hardware Design (AREA)
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种监控设备的方法和装置。The present invention relates to the field of computer technology, and in particular, to a method and device for monitoring equipment.
背景技术Background technique
当企业新上线一个项目时,通常需要将相应所编写的程序部署到服务器上启动运行。随着用户对项目访问量的增长,服务器的承载压力也逐渐增大,项目访问出现延迟甚至崩溃的情况。When an enterprise launches a new project, it usually needs to deploy the correspondingly written program to the server to start running. With the increase of users' access to the project, the load on the server gradually increases, and the project access is delayed or even crashes.
针对这种情况,目前有两种解决方案:There are currently two solutions for this situation:
1)增加服务器的分摊量;1) Increase the allocation of the server;
2)作为上述方式的替代方式,可以对JVM(Java Virtual Machine,Java虚拟机)的运行状态进行监控,找到性能瓶颈进行调优。2) As an alternative to the above method, the running state of a JVM (Java Virtual Machine, Java Virtual Machine) can be monitored, and a performance bottleneck can be found for tuning.
目前对JVM运行状态的监控,主要有两种方式:Currently, there are two main ways to monitor the running status of the JVM:
1)使用JSTAT(JVM Statistics Monitoring Tool,虚拟机统计信息监视工具)命令查看JVM信息;1) Use the JSTAT (JVM Statistics Monitoring Tool, virtual machine statistics monitoring tool) command to view the JVM information;
2)使用监控工具jconsole、jvisualvm、JMC(Java Mission Control,Java任务控制工具)监控JVM信息。2) Use monitoring tools jconsole, jvisualvm, JMC (Java Mission Control, Java Mission Control Tool) to monitor JVM information.
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:In the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art:
1)命令行本身不支持数据图形化展示,对于所获取的数据,还需要进行额外的计算和绘图操作,导致问题排查十分困难;1) The command line itself does not support the graphical display of data. For the acquired data, additional calculation and drawing operations are required, which makes troubleshooting very difficult;
2)使用监控工具仅能查看部分可图形化的数据;由于企业网络的安全限制,IDC(Internet Data Center,互联网数据中心)机房与办公网络不能直连,导致用户无法在办公网络中查看,只能去机房查看;2) Using monitoring tools can only view part of the data that can be graphed; due to the security restrictions of the enterprise network, the IDC (Internet Data Center, Internet Data Center) computer room cannot be directly connected to the office network, so users cannot view it in the office network, only Can go to the engine room to check;
3)监控工具为JDK(Java Develop Kit,Java开发工具包)提供,不能根据实际需求定制,灵活性较低。3) The monitoring tool is provided by JDK (Java Develop Kit, Java Development Kit), which cannot be customized according to actual needs, and has low flexibility.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供一种监控设备的方法和装置,至少能够解决现有技术中没有一个普适化的设备监控平台的问题。In view of this, embodiments of the present invention provide a method and apparatus for monitoring equipment, which can at least solve the problem that there is no universal equipment monitoring platform in the prior art.
为实现上述目的,根据本发明实施例的一个方面,提供了一种监控设备的方法,包括:确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备;接收所述监控设备在预定时长内所采集的所述被监控设备的运行信息,图形化所采集的运行信息并显示。In order to achieve the above object, according to an aspect of the embodiments of the present invention, a method for monitoring equipment is provided, including: determining address information of a monitored equipment, generating corresponding monitoring instructions and transmitting them to the monitoring equipment; The operation information of the monitored equipment collected within a predetermined period of time is graphed and displayed.
可选的,所述确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备,包括:Optionally, determining the address information of the monitored device, generating corresponding monitoring instructions and transmitting them to the monitoring device, including:
确定每个监控设备所监控的设备数量,传输所述监控指令至数量最少的监控设备;或Determine the number of devices monitored by each monitoring device, and transmit the monitoring instruction to the monitoring device with the smallest number; or
根据地址信息的编号与监控设备的对应关系,传输所述监控指令至与所述被监控设备的地址信息编号相应的监控设备。According to the corresponding relationship between the number of the address information and the monitoring device, the monitoring instruction is transmitted to the monitoring device corresponding to the address information number of the monitored device.
可选的,所述图形化所采集的运行信息并显示之后,还包括:Optionally, after the graphically collected operation information is displayed and displayed, the method further includes:
接收对所述监控设备的信息获取请求,解析所述信息获取请求得到所述监控设备的域名信息;转换所述域名信息为相应的地址信息,根据所转换的地址信息获取所述监控设备所采集的信息并图形化显示。Receive an information acquisition request for the monitoring device, parse the information acquisition request to obtain the domain name information of the monitoring device; convert the domain name information into corresponding address information, and obtain the information collected by the monitoring device according to the converted address information information and displayed graphically.
可选的,所述地址信息为JMX地址。Optionally, the address information is a JMX address.
为实现上述目的,根据本发明实施例的另一方面,提供了一种监控设备的装置,包括:To achieve the above object, according to another aspect of the embodiments of the present invention, a device for monitoring equipment is provided, including:
指令传输模块,用于确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备;The instruction transmission module is used to determine the address information of the monitored equipment, generate corresponding monitoring instructions and transmit them to the monitoring equipment;
信息采集模块,用于接收所述监控设备在预定时长内所采集的所述被监控设备的运行信息,图形化所采集的运行信息并显示。The information collection module is configured to receive the operation information of the monitored equipment collected by the monitoring equipment within a predetermined period of time, and to graph and display the collected operation information.
可选的,所述指令传输模块,用于:Optionally, the instruction transmission module is used for:
确定每个监控设备所监控的设备数量,传输所述监控指令至数量最少的监控设备;或Determine the number of devices monitored by each monitoring device, and transmit the monitoring instruction to the monitoring device with the smallest number; or
根据地址信息的编号与监控设备的对应关系,传输所述监控指令至与所述被监控设备的地址信息编号相应的监控设备。According to the corresponding relationship between the number of the address information and the monitoring device, the monitoring instruction is transmitted to the monitoring device corresponding to the address information number of the monitored device.
可选的,还包括请求处理模块,用于:Optionally, it also includes a request processing module for:
接收对所述监控设备的信息获取请求,解析所述信息获取请求得到所述监控设备的域名信息;receiving an information acquisition request for the monitoring device, and parsing the information acquisition request to obtain the domain name information of the monitoring device;
转换所述域名信息为相应的地址信息,根据所转换的地址信息获取所述监控设备所采集的信息并图形化显示。The domain name information is converted into corresponding address information, and the information collected by the monitoring device is acquired according to the converted address information and displayed graphically.
可选的,所述地址信息为JMX地址。Optionally, the address information is a JMX address.
为实现上述目的,根据本发明实施例的再一方面,提供了一种设备监控电子设备。To achieve the above object, according to yet another aspect of the embodiments of the present invention, an electronic device for monitoring equipment is provided.
本发明实施例的电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述任一所述的监控设备的方法。An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more programs cause the One or more processors implement any of the methods of monitoring a device described above.
为实现上述目的,根据本发明实施例的再一方面,提供了一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现上述任一所述的监控设备的方法。In order to achieve the above object, according to yet another aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any one of the above-mentioned methods for monitoring equipment is implemented .
根据本发明所述提供的方案,上述发明中的一个实施例具有如下优点或有益效果:利用JMX技术实现JVM信息的实时抓取,解决了生产环境JVM集群监控场景下,无法图形化展示JVM信息、无法长时间监控、以及无法对大规模集群监控等问题;利用域名解析实现办公网与生产环境的访问,最终在浏览器中以图形化界面展示所采集的信息。According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: using the JMX technology to realize the real-time capture of JVM information, it solves the problem that the JVM information cannot be displayed graphically in the production environment JVM cluster monitoring scenario , unable to monitor for a long time, and unable to monitor large-scale clusters; use domain name resolution to achieve access to the office network and production environment, and finally display the collected information in the browser in a graphical interface.
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。Further effects of the above non-conventional alternatives will be described below in conjunction with specific embodiments.
附图说明Description of drawings
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used for better understanding of the present invention and do not constitute an improper limitation of the present invention. in:
图1是根据本发明实施例的一种监控设备的方法的主要流程示意图;FIG. 1 is a schematic flowchart of a main flow of a method for monitoring equipment according to an embodiment of the present invention;
图2是本发明实施例的整体过程示意图;Fig. 2 is the overall process schematic diagram of the embodiment of the present invention;
图3是根据本发明实施例的一种监控设备的装置的主要模块示意图;3 is a schematic diagram of main modules of a device for monitoring equipment according to an embodiment of the present invention;
图4是本发明实施例可以应用于其中的示例性系统架构图;4 is an exemplary system architecture diagram to which an embodiment of the present invention may be applied;
图5是适于用来实现本发明实施例的移动设备或服务器的计算机系统的结构示意图。FIG. 5 is a schematic structural diagram of a computer system suitable for implementing a mobile device or a server according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
对于本发明所涉及的词语,做解释如下:The terms involved in the present invention are explained as follows:
JSTAT:用于监视虚拟机各种运行状态信息的命令行工具。可以显示本地或JVM进程中类装载、内存、垃圾收集、JIT编译等运行数据。JSTAT: A command-line tool for monitoring various running status information of virtual machines. It can display running data such as class loading, memory, garbage collection, JIT compilation, etc. in the local or JVM process.
GC(JVM垃圾回收)的工作机制:在堆中,找到已经无用的对象,并把这些对象占用的空间收回使其可以重新利用。The working mechanism of GC (JVM garbage collection): in the heap, find objects that have been useless, and reclaim the space occupied by these objects so that they can be reused.
参见图1,示出的是本发明实施例提供的一种监控设备的方法主要流程图,包括如下步骤:Referring to FIG. 1, a main flowchart of a method for monitoring equipment provided by an embodiment of the present invention is shown, including the following steps:
S101:确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备;S101: Determine the address information of the monitored equipment, generate corresponding monitoring instructions and transmit them to the monitoring equipment;
S102:接收监控设备在预定时长内所采集的被监控设备的运行信息,图形化所采集的运行信息并显示。S102 : Receive the operation information of the monitored device collected by the monitoring device within a predetermined period of time, and graph and display the collected operation information.
随着用户数量的增长、上线应用/网站的增加,java程序数量可能已过万。为减少工作人员的重复性工作,可以将JVM监控方法做成一个基础工作平台,以供各企业/工作人员使用,共享经验成果。With the growth of the number of users and the increase of online applications/websites, the number of java programs may exceed 10,000. In order to reduce the repetitive work of the staff, the JVM monitoring method can be made into a basic work platform for each enterprise/staff to use and share the experience and results.
上述实施方式中,对于步骤S101,用户可以在监控平台中,点击“添加监控”选项选择被监控机,添加被监控机的标识信息,例如JMX(Java Management Extensions,Java管理扩展)地址、IP地址(Internet Protocol Address,互联网协议地址)以及JVM端口号,例如127.0.0.1:52001。In the above embodiment, for step S101, the user can click the "Add Monitoring" option in the monitoring platform to select the monitored machine, and add the identification information of the monitored machine, such as JMX (Java Management Extensions, Java Management Extensions) address, IP address. (Internet Protocol Address) and the JVM port number, such as 127.0.0.1:52001.
对于已上线的应用程序,可以同时部署到多个被监控机中,每台被监控机上的java程序都可以开启一个JMX端口。当被监控机的端口为关闭状态时,需要对其进行开启操作,例如,根据其JVM启动参数,Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=52001-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false开启其端口;且该参数也可以重启该被监控机上的应用程序,以打开其JMX管理端口,这样监控机才能连接上该被监控机,以获取监控信息。For online applications, it can be deployed to multiple monitored machines at the same time, and the java program on each monitored machine can open a JMX port. When the port of the monitored machine is closed, it needs to be opened. For example, according to its JVM startup parameters, Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=52001-Dcom.sun. management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false to open its port; and this parameter can also restart the application on the monitored machine to open its JMX management port, so that the monitoring machine can connect The monitored machine to obtain monitoring information.
系统将被监控设备的地址信息,分配给监控机,例如:The system assigns the address information of the monitored equipment to the monitoring machine, for example:
1)确定每台监控机所监控的设备数量,并将本次待监控设备的地址分配给数量最少的监控机,实现平均分配,以均衡各个监控机的监控量;1) Determine the number of devices monitored by each monitoring machine, and assign the address of the device to be monitored this time to the monitoring machine with the least number to achieve an even distribution to balance the monitoring amount of each monitoring machine;
2)每个监控机所监控的机器编号固定;例如,有10个监控机,监控机1监控排序1号、11号的被监控机,监控机2监控排序2号、12号的被监控机。2) The number of machines monitored by each monitoring machine is fixed; for example, there are 10 monitoring machines, monitoring machine 1 monitors the monitored machines ranked No. 1 and 11, and monitoring machine 2 monitors the monitored machines ranked No. 2 and No. 12 .
对于监控机以及被监控机的监控关系,可以存储于监控配置表中,例如mysql(关系型数据库管理系统)监控配置表,具体参见表1所示:The monitoring relationship between the monitoring machine and the monitored machine can be stored in the monitoring configuration table, such as the mysql (relational database management system) monitoring configuration table, as shown in Table 1:
表1监控关系表Table 1 Monitoring relationship table
需要说明的是,监控配置表中的监控关系为用户在平台上添加被监控机、并分配监控机后才产生的。另外,每台监控机的可监控量有限,例如上限50个。每当被监控机的数量超出所有监控机的可监控上限时,就需要进行监控机扩充,使得监控集群可以合理扩展。It should be noted that the monitoring relationship in the monitoring configuration table is generated after the user adds the monitored machine on the platform and assigns the monitoring machine. In addition, the monitorable quantity of each monitoring machine is limited, for example, the upper limit is 50. Whenever the number of monitored machines exceeds the monitorable upper limit of all monitoring machines, it is necessary to expand the monitoring machines so that the monitoring cluster can be reasonably expanded.
监控机接收到监控指令,对于被监控机地址的获取,可以根据监控配置表得到。例如,监控机上的监控程序启动后,通过JMX协议与被监控机的JMX端口进行连接,并触发对被监控机的监控操作。When the monitoring machine receives the monitoring instruction, the address of the monitored machine can be obtained according to the monitoring configuration table. For example, after the monitoring program on the monitoring machine is started, it connects with the JMX port of the monitored machine through the JMX protocol, and triggers the monitoring operation on the monitored machine.
对于步骤S102,监控机与被监控机连接后,就可以通过java接口获取被监控机的运行信息,例如,内存当前大小、GC耗时、线程数等等。这些信息可以存入数据库中,例如Redis缓存中,本发明对于数据库的类型不做限制。For step S102, after the monitoring machine is connected to the monitored machine, the running information of the monitored machine, for example, the current size of the memory, the GC time-consuming, the number of threads, etc., can be obtained through the java interface. These information can be stored in a database, such as a Redis cache, and the present invention does not limit the type of the database.
所获取的数据,可以是处于一定时长内的,例如:The acquired data can be within a certain period of time, for example:
1)响应于用户点击操作才去获取的,例如线程快照信息,该信息是不监控历史数据的,就是实时查看实时获取,此时的时长可以是1s,甚至ms内的数据;1) It is obtained in response to the user's click operation, such as thread snapshot information, which does not monitor historical data, but is obtained by real-time viewing. At this time, the duration can be 1s, or even data in ms;
2)需要查看历史数据,例如GC耗时数据,GC的间隔越长越好,耗时越短越好。不论用户是否点击查看,这些数据都是会被监控机采集并存储在数据库中,这样用户无论何时点击查看都可以查到历史任何时间JVM的运行状态。2) You need to view historical data, such as GC time-consuming data. The longer the GC interval, the better, and the shorter the time-consuming, the better. Regardless of whether the user clicks to view or not, these data will be collected by the monitoring machine and stored in the database, so that the user can check the running status of the JVM at any time in history whenever he clicks to view.
对于所获取的数据,可以以图形化的方式展示,例如折线图,横轴代表数据获取时间、纵轴代表所获取的数值,这样利用jcharts等一些js插件就将数据以图形化的方式展示出来。For the acquired data, it can be displayed graphically, such as a line chart. The horizontal axis represents the data acquisition time, and the vertical axis represents the acquired value. In this way, some js plugins such as jcharts can be used to display the data graphically. .
同一应用程序的用户,可以查看该应用下的所有该应用下的所有JMX监控信息,整体过程参见图2所示。Users of the same application can view all JMX monitoring information under this application. The overall process is shown in Figure 2.
但用户在办公网络只能访问域名,而无法直接访问监控机。本发明通过域名解析,将所输入的域名解析为监控机的地址,例如,JMX地址。因此,用户通过访问平台所输入的域名,访问到监控机上去查询监控机的JVM动态数据。However, users can only access the domain name in the office network, but cannot directly access the monitoring machine. The present invention resolves the input domain name into the address of the monitoring machine, for example, the JMX address, through domain name resolution. Therefore, the user accesses the monitoring machine to query the JVM dynamic data of the monitoring machine by accessing the domain name entered by the platform.
另外,监控机所采集的信息都存储于数据库中。用户查询监控机所采集的信息,实际上是在数据库中进行查询。因此,该操作实际上是先访问数据库,然后在数据库中根据监控机的标识信息,例如JMX地址,确定其所采集的信息。In addition, the information collected by the monitoring machine is stored in the database. When the user queries the information collected by the monitoring machine, it is actually querying in the database. Therefore, the operation is actually to access the database first, and then determine the collected information in the database according to the identification information of the monitoring machine, such as the JMX address.
上述实施例所提供的方法,利用JMX技术实现被监控机JVM信息的实时抓取,解决了生产环境JVM集群监控场景下,无法图形化展示JVM信息、无法长时间监控、以及无法对大规模集群监控等问题;利用域名解析实现办公网与生产环境的访问,最终在浏览器中以图形化界面展示所采集的信息。The method provided by the above embodiment uses the JMX technology to realize the real-time capture of the JVM information of the monitored machine, and solves the problem that in the production environment JVM cluster monitoring scenario, the JVM information cannot be displayed graphically, long-term monitoring cannot be performed, and large-scale clusters cannot be monitored. Monitoring and other issues; use domain name resolution to achieve access to the office network and production environment, and finally display the collected information in the browser with a graphical interface.
参见图3,示出了本发明实施例提供的一种监控设备的装置300的主要模块示意图,包括:Referring to FIG. 3 , a schematic diagram of main modules of an
指令传输模块301,用于确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备;The
信息采集模块302,用于接收所述监控设备在预定时长内所采集的所述被监控设备的运行信息,图形化所采集的运行信息并显示。The
本发明实施装置中,所述指令传输模块301,用于:In the implementation device of the present invention, the
确定每个监控设备所监控的设备数量,传输所述监控指令至数量最少的监控设备;或Determine the number of devices monitored by each monitoring device, and transmit the monitoring instruction to the monitoring device with the smallest number; or
根据地址信息的编号与监控设备的对应关系,传输所述监控指令至与所述被监控设备的地址信息编号相应的监控设备。According to the corresponding relationship between the number of the address information and the monitoring device, the monitoring instruction is transmitted to the monitoring device corresponding to the address information number of the monitored device.
本发明实施装置还包括请求处理模块303(图中未标出),用于:The implementation device of the present invention further includes a request processing module 303 (not marked in the figure), which is used for:
接收对所述监控设备的信息获取请求,解析所述信息获取请求得到所述监控设备的域名信息;receiving an information acquisition request for the monitoring device, and parsing the information acquisition request to obtain the domain name information of the monitoring device;
转换所述域名信息为相应的地址信息,根据所转换的地址信息获取所述监控设备所采集的信息并图形化显示。The domain name information is converted into corresponding address information, and the information collected by the monitoring device is acquired according to the converted address information and displayed graphically.
本发明实施装置中,所述地址信息为JMX地址。In the implementation device of the present invention, the address information is a JMX address.
另外,在本发明实施例中所述的监控设备的装置的具体实施内容,在上面所述监控设备的方法中已经详细说明了,故在此重复内容不再说明。In addition, the specific implementation content of the apparatus for monitoring equipment described in the embodiments of the present invention has been described in detail in the method for monitoring equipment described above, so the repeated content will not be described here.
上述实施例所提供的装置,利用JMX技术实现JVM信息的实时抓取,解决了生产环境JVM集群监控场景下,无法图形化展示JVM信息、无法长时间监控、以及无法对大规模集群监控等问题;利用域名解析实现办公网与生产环境的访问,最终在浏览器中以图形化界面展示。The device provided by the above embodiment uses JMX technology to realize real-time capture of JVM information, and solves the problems of inability to graphically display JVM information, inability to monitor for a long time, and inability to monitor large-scale clusters in the production environment JVM cluster monitoring scenario. ;Using domain name resolution to achieve access to the office network and production environment, and finally display it in a browser with a graphical interface.
图4示出了可以应用本发明实施例的监控设备的方法或监控设备的装置的示例性系统架构400。FIG. 4 shows an
如图4所示,系统架构400可以包括终端设备401、402、403,网络404和服务器405(仅仅是示例)。网络404用以在终端设备401、402、403和服务器405之间提供通信链路的介质。网络404可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Figure 4, the
用户可以使用终端设备401、402、403通过网络404与服务器405交互,以接收或发送消息等。终端设备401、402、403上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the
终端设备401、402、403可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The
服务器405可以是提供各种服务的服务器,例如对用户利用终端设备401、402、403所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。The
需要说明的是,本发明实施例所提供的监控设备的方法一般由服务器405执行,相应地,监控设备的装置一般设置于服务器405中。It should be noted that, the method for monitoring equipment provided in the embodiment of the present invention is generally executed by the
应该理解,图4中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 4 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
下面参考图5,其示出了适于用来实现本发明实施例的终端设备的计算机系统500的结构示意图。图5示出的终端设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring to FIG. 5 below, it shows a schematic structural diagram of a computer system 500 suitable for implementing a terminal device according to an embodiment of the present invention. The terminal device shown in FIG. 5 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present invention.
如图5所示,计算机系统500包括中央处理单元(CPU)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有系统500操作所需的各种程序和数据。CPU 501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG. 5, a computer system 500 includes a central processing unit (CPU) 501 which can be loaded into a random access memory (RAM) 503 according to a program stored in a read only memory (ROM) 502 or a program from a
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。The following components are connected to the I/O interface 505: an
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本发明的系统中限定的上述功能。In particular, the processes described above with reference to the flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the present invention. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart 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 that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks 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 is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括指令传输模块以及信息采集模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,指令传输模块还可以被描述为“传输监控指令至监控设备的模块”。The modules involved in the embodiments of the present invention may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules can also be set in the processor, for example, it can be described as: a processor includes an instruction transmission module and an information collection module. Wherein, the names of these modules do not constitute a limitation of the module itself under certain circumstances, for example, the command transmission module may also be described as "a module for transmitting monitoring commands to monitoring equipment".
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes:
确定被监控设备的地址信息,生成相应的监控指令并传输至监控设备;Determine the address information of the monitored equipment, generate corresponding monitoring instructions and transmit them to the monitoring equipment;
接收所述监控设备在预定时长内所采集的所述被监控设备的运行信息,图形化所采集的运行信息并显示。The operation information of the monitored equipment collected by the monitoring equipment within a predetermined period of time is received, and the collected operation information is graphically displayed and displayed.
根据本发明实施例的技术方案,利用JMX技术实现JVM信息的实时抓取,解决了生产环境JVM集群监控场景下,无法图形化展示JVM信息、无法长时间监控、以及无法对大规模集群监控等问题;利用域名解析实现办公网与生产环境的访问,最终在浏览器中以图形化界面展示。According to the technical solution of the embodiment of the present invention, the real-time capture of JVM information is realized by using JMX technology, which solves the problem that in the production environment JVM cluster monitoring scenario, the JVM information cannot be displayed graphically, long-term monitoring cannot be performed, and large-scale cluster monitoring cannot be performed. Problem; use domain name resolution to achieve access to the office network and production environment, and finally display it in a browser with a graphical interface.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810996060.1A CN110874300B (en) | 2018-08-29 | 2018-08-29 | A method and device for monitoring equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810996060.1A CN110874300B (en) | 2018-08-29 | 2018-08-29 | A method and device for monitoring equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110874300A true CN110874300A (en) | 2020-03-10 |
CN110874300B CN110874300B (en) | 2025-01-14 |
Family
ID=69714614
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810996060.1A Active CN110874300B (en) | 2018-08-29 | 2018-08-29 | A method and device for monitoring equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110874300B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988573A (en) * | 2020-08-27 | 2020-11-24 | 浙江中控技术股份有限公司 | Industrial control information display method, device and system |
CN112328924A (en) * | 2020-10-27 | 2021-02-05 | 青岛以萨数据技术有限公司 | Method, electronic device, medium and system for realizing picture viewer at web end |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020174367A1 (en) * | 1999-09-01 | 2002-11-21 | Kimmel David E. | Method and apparatus for remotely monitoring a site |
CN102332988A (en) * | 2011-06-21 | 2012-01-25 | 杭州华三通信技术有限公司 | Method and device for transmitting alert information in monitoring system |
CN103716398A (en) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | Method and system for monitoring CDN server |
CN105224244A (en) * | 2015-09-07 | 2016-01-06 | 浙江宇视科技有限公司 | The method and apparatus that a kind of file stores |
CN107168089A (en) * | 2017-06-30 | 2017-09-15 | 镇江千月广告传媒有限公司 | A kind of method being monitored to intelligent home device |
CN107179979A (en) * | 2016-03-10 | 2017-09-19 | 阿里巴巴集团控股有限公司 | A kind of acquisition of remote terminal information, analysis method, apparatus and system |
CN107291587A (en) * | 2016-04-11 | 2017-10-24 | 北京京东尚科信息技术有限公司 | Computer applied algorithm monitoring method and device |
CN107343012A (en) * | 2016-04-28 | 2017-11-10 | 杭州海康威视数字技术股份有限公司 | Video Storage System and its video data transmitting method |
CN108023910A (en) * | 2016-11-01 | 2018-05-11 | 北京视联动力国际信息技术有限公司 | A kind of terminal monitoring method and system based on regarding networking |
CN108055505A (en) * | 2017-12-11 | 2018-05-18 | 深圳市东微智能科技股份有限公司 | Monitoring device control method, device, system, storage medium and computer equipment |
-
2018
- 2018-08-29 CN CN201810996060.1A patent/CN110874300B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020174367A1 (en) * | 1999-09-01 | 2002-11-21 | Kimmel David E. | Method and apparatus for remotely monitoring a site |
CN102332988A (en) * | 2011-06-21 | 2012-01-25 | 杭州华三通信技术有限公司 | Method and device for transmitting alert information in monitoring system |
CN103716398A (en) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | Method and system for monitoring CDN server |
CN105224244A (en) * | 2015-09-07 | 2016-01-06 | 浙江宇视科技有限公司 | The method and apparatus that a kind of file stores |
CN107179979A (en) * | 2016-03-10 | 2017-09-19 | 阿里巴巴集团控股有限公司 | A kind of acquisition of remote terminal information, analysis method, apparatus and system |
CN107291587A (en) * | 2016-04-11 | 2017-10-24 | 北京京东尚科信息技术有限公司 | Computer applied algorithm monitoring method and device |
CN107343012A (en) * | 2016-04-28 | 2017-11-10 | 杭州海康威视数字技术股份有限公司 | Video Storage System and its video data transmitting method |
CN108023910A (en) * | 2016-11-01 | 2018-05-11 | 北京视联动力国际信息技术有限公司 | A kind of terminal monitoring method and system based on regarding networking |
CN107168089A (en) * | 2017-06-30 | 2017-09-15 | 镇江千月广告传媒有限公司 | A kind of method being monitored to intelligent home device |
CN108055505A (en) * | 2017-12-11 | 2018-05-18 | 深圳市东微智能科技股份有限公司 | Monitoring device control method, device, system, storage medium and computer equipment |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988573A (en) * | 2020-08-27 | 2020-11-24 | 浙江中控技术股份有限公司 | Industrial control information display method, device and system |
CN112328924A (en) * | 2020-10-27 | 2021-02-05 | 青岛以萨数据技术有限公司 | Method, electronic device, medium and system for realizing picture viewer at web end |
CN112328924B (en) * | 2020-10-27 | 2023-08-01 | 青岛以萨数据技术有限公司 | Method, electronic equipment, medium and system for realizing picture viewer by web side |
Also Published As
Publication number | Publication date |
---|---|
CN110874300B (en) | 2025-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190097942A1 (en) | Orchestrating computing resources between different computing environments | |
CN111190888A (en) | Method and device for managing graph database cluster | |
US11695623B2 (en) | Method and apparatus for binding network card in multi-network card server, and electronic device and storage medium | |
CN110659124A (en) | A message processing method and device | |
CN113760638B (en) | A log service method and device based on kubernetes cluster | |
US20160323160A1 (en) | Detection of node.js memory leaks | |
CN110083457A (en) | A kind of data capture method, device and data analysing method, device | |
CN111831503B (en) | Monitoring method based on monitoring agent and monitoring agent device | |
US10067862B2 (en) | Tracking asynchronous entry points for an application | |
US10223407B2 (en) | Asynchronous processing time metrics | |
CN110874300B (en) | A method and device for monitoring equipment | |
CN109324892B (en) | Distributed management method, distributed management system and device | |
US10191844B2 (en) | Automatic garbage collection thrashing monitoring | |
CN111488268A (en) | Scheduling method and scheduling device for automated testing | |
CN107682222A (en) | A kind of information monitoring method, apparatus and system | |
CN109213743A (en) | A kind of data query method and apparatus | |
CN111698109A (en) | Method and device for monitoring log | |
CN112559001B (en) | Method and device for updating application | |
CN116263768A (en) | Information pushing method and device based on cloud platform | |
CN110768855B (en) | Method and device for testing linkmzation performance | |
US20150222505A1 (en) | Business transaction resource usage tracking | |
CN110890975B (en) | Data task management automation method, system, electronic device, and storage medium | |
CN110554942A (en) | method and device for monitoring code execution | |
CN117093327A (en) | Virtual machine program monitoring method, device, equipment and storage medium | |
CN115422012A (en) | A data processing method, device, electronic device, and computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |