[go: up one dir, main page]

CN116136818A - Method, device, equipment and medium for health inspection of message queue - Google Patents

Method, device, equipment and medium for health inspection of message queue Download PDF

Info

Publication number
CN116136818A
CN116136818A CN202310139173.0A CN202310139173A CN116136818A CN 116136818 A CN116136818 A CN 116136818A CN 202310139173 A CN202310139173 A CN 202310139173A CN 116136818 A CN116136818 A CN 116136818A
Authority
CN
China
Prior art keywords
server
inspection
message queue
script
list information
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
CN202310139173.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310139173.0A priority Critical patent/CN116136818A/en
Publication of CN116136818A publication Critical patent/CN116136818A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The disclosure provides a health inspection method, a device, equipment and a medium for a message queue, which can be applied to the technical field of computers and the technical field of artificial intelligence. The health inspection method for the message queue comprises the following steps: acquiring a patrol task deployed in a patrol platform, wherein the patrol task is configured with a preset execution frequency; acquiring list information of a server provided with a message queue from a configuration management platform, wherein the server in the list information is pre-deployed with a checking script containing message queue indexes; and carrying out inspection on the message queue of the server in the list information according to the message queue index according to the preset execution frequency of the inspection task and the inspection script, so as to obtain a health inspection result.

Description

用于消息队列的健康巡检方法、装置、设备及介质Method, device, equipment and medium for health inspection of message queue

技术领域technical field

本公开涉及计算机技术领域和人工智能技术领域,更具体地,涉及一种用于消息队列的健康巡检方法、装置、设备及介质。The present disclosure relates to the fields of computer technology and artificial intelligence technology, and more specifically, to a health inspection method, device, device and medium for message queues.

背景技术Background technique

近年来,数据中心服务器规模呈现爆发性增长,其中,数量增长最快的主要集中在使用廉价的X86开放平台系统的服务器,MQ(Message Queue,消息队列)服务器也随之激增。In recent years, the scale of data center servers has shown explosive growth. Among them, the fastest growing number is mainly concentrated on servers using cheap X86 open platform systems, and MQ (Message Queue, message queue) servers have also surged accordingly.

在实现本公开构思的过程中,发明人发现相关技术中至少存在如下问题:MQ服务器中的消息队列的一些异常指标会导致整个业务应用侧异常,造成不可避免的资产损失。相关技术中一般以人工方式对MQ服务器中的消息队列指标进行检查,这种以人工进行巡检的方式存在巡检效率低以及无法应对大规模服务器检查的问题。In the process of implementing the disclosed concept, the inventors found that there are at least the following problems in related technologies: some abnormal indicators of message queues in the MQ server will cause abnormalities on the entire business application side, resulting in inevitable asset losses. In related technologies, the message queue indicators in the MQ server are generally checked manually. This manual inspection method has the problems of low inspection efficiency and inability to cope with large-scale server inspections.

发明内容Contents of the invention

有鉴于此,本公开提供了一种用于消息队列的健康巡检方法、装置、设备及介质。In view of this, the present disclosure provides a health inspection method, device, device and medium for message queues.

本公开的一个方面提供了一种用于消息队列的健康巡检方法,包括:One aspect of the present disclosure provides a health inspection method for message queues, including:

获取在巡检平台中部署的巡检任务,上述巡检任务被配置有预设执行频率;Obtain the inspection tasks deployed in the inspection platform, and the above inspection tasks are configured with a preset execution frequency;

从配置管理平台中获取设置有消息队列的服务器的清单信息,其中,上述清单信息中的服务器预先部署有包含消息队列指标的检查脚本;以及Obtaining list information of servers configured with message queues from the configuration management platform, wherein the servers in the above list information are pre-deployed with check scripts containing message queue indicators; and

根据上述巡检任务的预设执行频率和上述检查脚本,按照上述消息队列指标对上述清单信息中的服务器的消息队列进行巡检,得到健康巡检结果。According to the preset execution frequency of the above-mentioned inspection task and the above-mentioned inspection script, the message queue of the server in the above-mentioned list information is inspected according to the above-mentioned message queue index, and the health inspection result is obtained.

根据本公开的实施例,上述消息队列指标包括第一类指标和第二类指标,上述第一类指标表征由用户的错误操作导致上述清单信息中的服务器的消息队列的信息传输异常的指标,第二类指标表征使上述清单信息中的服务器的消息队列进行正常传输信息的必要指标。According to an embodiment of the present disclosure, the above-mentioned message queue indicators include a first-type indicator and a second-type indicator, and the above-mentioned first-type indicator represents an indicator of an abnormal information transmission of the message queue of the server in the above-mentioned list information caused by a wrong operation of the user. The second type of index represents the necessary index for the message queue of the server in the above list information to transmit information normally.

根据本公开的实施例,上述根据上述巡检任务的预设执行频率和上述检查脚本,按照上述消息队列指标对上述清单信息中的服务器的消息队列进行巡检,得到健康巡检结果包括:According to an embodiment of the present disclosure, according to the preset execution frequency of the above-mentioned inspection task and the above-mentioned inspection script, the message queue of the server in the above-mentioned list information is inspected according to the above-mentioned message queue index, and the health inspection results obtained include:

获取上述清单信息中的服务器的日志信息;Obtain the log information of the server in the above list information;

根据上述日志信息,得到上述清单信息中的服务器的消息队列的第一类指标的指标值,其中,上述第一类指标的指标值包括客户端的用户密码输错次数、用户的当前状态以及用户最后一次输错密码的时间;According to the above log information, the index value of the first type of index of the server’s message queue in the above list information is obtained, wherein the index value of the above first type of index includes the number of times the client’s user password is entered incorrectly, the user’s current status, and the user’s last The time when a wrong password is entered once;

根据上述第一类指标的指标值,得到上述健康巡检结果。According to the index value of the above-mentioned first type of index, the above-mentioned health inspection result is obtained.

根据本公开的实施例,上述根据上述巡检任务的预设执行频率和上述检查脚本,按照上述消息队列指标对上述清单信息中的服务器的消息队列进行巡检,得到健康巡检结果包括:According to an embodiment of the present disclosure, according to the preset execution frequency of the above-mentioned inspection task and the above-mentioned inspection script, the message queue of the server in the above-mentioned list information is inspected according to the above-mentioned message queue index, and the health inspection results obtained include:

获取上述清单信息中的服务器的配置文件;Obtain the configuration file of the server in the above list information;

对上述配置文件中的配置信息与上述第二类指标的指标值进行比较,得到比较结果,其中,上述第二类指标的指标值包括以下至少之一:上述清单信息中的服务器的传输控制协议是否设置为长链接、接收方服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方服务器是否采用建立新的通道、新入进程等待老进程结束的秒数是否等于预设值以及上述服务器对采用新的通道进行自检测的设置是否开启;Comparing the configuration information in the above configuration file with the index value of the second type of index above to obtain a comparison result, wherein the index value of the second type of index above includes at least one of the following: the transmission control protocol of the server in the above list information Whether it is set to a long link, when the receiving server receives a channel connection request and the process related to the channel exists, whether the receiving server uses the method of establishing a new channel, whether the number of seconds for the new incoming process to wait for the old process to end is equal to the preset value and whether the above-mentioned server's setting for self-testing using a new channel is turned on;

根据上述比较结果,得到上述健康巡检结果。According to the above comparison results, the above health inspection results are obtained.

根据本公开的实施例,上述包含消息队列指标的检查脚本根据如下步骤在上述清单信息中的服务器中进行预先部署:According to an embodiment of the present disclosure, the above check script containing message queue indicators is pre-deployed in the server in the above list information according to the following steps:

根据业务需求编写包含消息队列指标的初始检查脚本;Write an initial check script that includes message queue metrics based on business requirements;

通过脚本管理平台对上述初始检查脚本进行脚本发布;Script release of the above-mentioned initial inspection script through the script management platform;

对上述初始检查脚本进行功能测试,得到通过功能测试的上述检查脚本;Perform a functional test on the above-mentioned initial check script, and obtain the above-mentioned check script that passes the functional test;

将上述检查脚本提交到脚本库;Submit the above check script to the script library;

通过脚本管理平台按照预定时间将上述脚本库中的上述检查脚本部署到上述清单信息中的服务器中。The above checking script in the above script library is deployed to the server in the above list information according to the predetermined time through the script management platform.

根据本公开的实施例,还包括:According to an embodiment of the present disclosure, it also includes:

将上述健康度巡检结果返回给上述巡检平台;Return the above-mentioned health inspection results to the above-mentioned inspection platform;

将上述健康度巡检结果存储到巡检结果数据库中。The above-mentioned health degree inspection results are stored in the inspection result database.

根据本公开的实施例,还包括:According to an embodiment of the present disclosure, it also includes:

根据上述健康度巡检结果定位存在异常指标的服务器;Locate servers with abnormal indicators according to the above health inspection results;

根据上述存在异常指标的服务器及上述健康度巡检结果,对上述存在异常指标的服务器进行处理。According to the above-mentioned servers with abnormal indicators and the results of the health inspection, the above-mentioned servers with abnormal indicators are processed.

本公开的另一方面提供了一种用于消息队列的健康巡检装置,包括:Another aspect of the present disclosure provides a health inspection device for message queues, including:

巡检任务获取模块,用于获取在巡检平台中部署的巡检任务,上述巡检任务被配置有预设执行频率;The inspection task acquisition module is used to obtain the inspection tasks deployed in the inspection platform, and the above inspection tasks are configured with a preset execution frequency;

服务器信息获取模块,用于从配置管理平台中获取设置有消息队列的服务器的清单信息,其中,上述清单信息中的服务器预先部署有包含消息队列指标的检查脚本;以及The server information obtaining module is used to obtain the list information of the servers configured with message queues from the configuration management platform, wherein the servers in the above list information are pre-deployed with check scripts containing message queue indicators; and

巡检结果得到模块,用于根据上述巡检任务的预设执行频率和上述检查脚本,按照上述消息队列指标对上述清单信息中的服务器的消息队列进行巡检,得到健康巡检结果。The inspection result obtaining module is configured to inspect the message queue of the server in the list information according to the preset execution frequency of the inspection task and the inspection script, and obtain the health inspection result.

本公开的另一方面提供了电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个指令,其中,当一个或多个指令被一个或多个处理器执行时,使得一个或多个处理器实现如上所述的方法。Another aspect of the present disclosure provides an electronic device, including: one or more processors; a memory for storing one or more instructions, wherein, when the one or more instructions are executed by the one or more processors, such that One or more processors implement the methods described above.

本公开的另一方面提供了一种计算机可读存储介质,存储有计算机可执行指令,指令被处理器执行时使处理器实现如上所述的方法。Another aspect of the present disclosure provides a computer-readable storage medium, storing computer-executable instructions, which, when executed by a processor, cause the processor to implement the above method.

本公开的另一方面提供了一种计算机程序产品,计算机程序产品包括计算机可执行指令,指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer program product comprising computer-executable instructions for implementing the method as described above when executed.

根据本公开的实施例,通过获取在巡检平台中部署的巡检任务,巡检任务被配置有预设执行频率,得到巡检任务中包括的待检测的业务类型及与待检测的业务类型相关的预设执行频率,然后根据待检测的业务类型,从配置管理平台中获取与待检测业务类型相关的设置有消息队列的服务器的清单信息,其中,清单信息中的服务器预先部署有包含消息队列指标的检查脚本,设置有消息队列的服务器为MQ服务器,接着根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的MQ服务器的消息队列进行巡检,得到健康巡检结果,实现根据巡检任务的预设执行频率和检查脚本,对清单信息中的MQ服务器的消息队列的消息队列指标进行自动巡检,得到清单信息中的MQ服务器的消息队列是否存在异常指标的检测结果,提高对清单信息中的MQ服务器的消息队列的消息队列指标进行巡检的效率,实现快速对大规模的MQ服务器的消息队列的消息队列指标进行检查,及时在大规模的MQ服务器的消息队列中发现异常的消息队列。According to the embodiment of the present disclosure, by acquiring the inspection task deployed in the inspection platform, the inspection task is configured with a preset execution frequency, and the business type to be detected included in the inspection task and the business type to be detected are obtained. Related preset execution frequency, and then according to the service type to be detected, obtain the list information of the servers with message queues related to the service type to be detected from the configuration management platform, wherein, the servers in the list information are pre-deployed with messages containing The check script of the queue index, set the server with the message queue as the MQ server, and then according to the preset execution frequency and check script of the inspection task, inspect the message queue of the MQ server in the list information according to the message queue index, and obtain the health Inspection results, realize automatic inspection of the message queue indicators of the MQ server's message queue in the list information according to the preset execution frequency and inspection script of the inspection task, and obtain whether the message queue of the MQ server in the list information is abnormal The detection results of the indicators improve the efficiency of the inspection of the message queue indicators of the message queues of the MQ server in the list information, and realize the rapid inspection of the message queue indicators of the message queues of the large-scale MQ servers. An abnormal message queue was found in the server's message queue.

附图说明Description of drawings

通过以下参照附图对本公开实施例的描述,本公开的上述以及其他目的、特征和优点将更为清楚,在附图中:The above and other objects, features and advantages of the present disclosure will be more clearly described through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

图1示意性示出了根据本公开实施例的可以应用用于消息队列的健康巡检方法的示例性系统架构;FIG. 1 schematically shows an exemplary system architecture to which a health inspection method for a message queue can be applied according to an embodiment of the present disclosure;

图2示意性示出了根据本公开实施例的用于消息队列的健康巡检方法的流程图;FIG. 2 schematically shows a flow chart of a method for health inspection of a message queue according to an embodiment of the present disclosure;

图3示意性示出了根据本公开实施例的消息队列指标;Fig. 3 schematically shows a message queue indicator according to an embodiment of the present disclosure;

图4示意性示出了根据本公开的实施例的对服务器部署检查脚本的流程图;Fig. 4 schematically shows a flow chart of deploying a check script on a server according to an embodiment of the present disclosure;

图5示意性示出了根据本公开另一实施例的用于消息队列的健康巡检方法的流程图;FIG. 5 schematically shows a flow chart of a method for health inspection of a message queue according to another embodiment of the present disclosure;

图6示意性示出了根据本公开的实施例的用于消息队列的健康巡检装置的框图;Fig. 6 schematically shows a block diagram of a health inspection device for a message queue according to an embodiment of the present disclosure;

图7示意性示出了根据本公开实施例的适于实现上文描述的方法的计算机系统的框图。Fig. 7 schematically shows a block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. 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 present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concept of the present disclosure.

在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting of the present disclosure. The terms "comprising", "comprising", etc. used herein indicate the presence of stated features, steps, operations and/or components, but do not exclude 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 meaning commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted to have a meaning consistent with the context of this specification, and not be interpreted in an idealized or overly rigid manner.

在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。Where expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted as those skilled in the art would normally understand the expression (for example, "having A, B, and C A system of at least one of "shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ). Where expressions such as "at least one of A, B, or C, etc." are used, they should generally be interpreted as those skilled in the art would normally understand the expression (for example, "having A, B, or C A system of at least one of "shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ).

在本公开的技术方案中,所涉及的用户个人信息的获取,存储和应用等,均符合相关法律法规的规定,采用了必要保密措施,且不违背公序良俗。In the technical solution of the present disclosure, the acquisition, storage and application of the user's personal information involved are in compliance with relevant laws and regulations, necessary confidentiality measures have been adopted, and they do not violate public order and good customs.

MQ服务器中的消息队列的一些异常指标会导致整个业务应用侧异常,造成不可避免的资产损失。相关技术中一般以人工方式对MQ服务器中的消息队列指标进行检查,这种以人工进行巡检的方式存在巡检效率低以及无法应对大规模服务器检查的问题。Some abnormal indicators of the message queue in the MQ server will cause abnormalities on the entire business application side, resulting in inevitable asset losses. In related technologies, the message queue indicators in the MQ server are generally checked manually. This manual inspection method has the problems of low inspection efficiency and inability to cope with large-scale server inspections.

为了至少部分地解决相关技术中存在的技术问题,本公开的实施例提供了一种用于消息队列的健康巡检方法、装置、设备及介质,可以应用于计算机技术领域和人工智能技术领域。该用于消息队列的健康巡检方法包括:获取在巡检平台中部署的巡检任务,巡检任务被配置有预设执行频率;从配置管理平台中获取设置有消息队列的服务器的清单信息,其中,清单信息中的服务器预先部署有包含消息队列指标的检查脚本;以及根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的服务器的消息队列进行巡检,得到健康巡检结果。In order to at least partly solve the technical problems in related technologies, embodiments of the present disclosure provide a method, device, device and medium for health inspection of message queues, which can be applied in the fields of computer technology and artificial intelligence technology. The health inspection method for message queues includes: obtaining inspection tasks deployed on the inspection platform, where the inspection tasks are configured with a preset execution frequency; obtaining list information of servers configured with message queues from the configuration management platform , wherein, the servers in the list information are pre-deployed with check scripts containing message queue indicators; and according to the preset execution frequency and check scripts of the inspection tasks, the message queues of the servers in the list information are inspected according to the message queue indicators, Get the health inspection results.

图1示意性示出了根据本公开实施例的可以应用用于消息队列的健康巡检方法的示例性系统架构。需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。Fig. 1 schematically shows an exemplary system architecture to which a health inspection method for a message queue can be applied according to an embodiment of the present disclosure. It should be noted that, what is shown in FIG. 1 is only an example of the system architecture to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other device, system, environment or scenario.

如图1所示,根据该实施例的系统架构100可以包括第一终端设备101、第二终端设备102、第三终端设备103,网络104和服务器105。网络104用以在第一终端设备101、第二终端设备102、第三终端设备103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线和/或无线通信链路等等。As shown in FIG. 1 , a system architecture 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 used as a medium for providing communication links among the first terminal device 101 , the second terminal device 102 , the third terminal device 103 and the server 105 . Network 104 may include various connection types, such as wired and/or wireless communication links, among others.

用户可以使用第一终端设备101、第二终端设备102、第三终端设备103中的至少一个通过网络104与服务器105交互,以接收或发送消息等。第一终端设备101、第二终端设备102、第三终端设备103上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端和/或社交平台软件等(仅为示例)。A user can use at least one of the first terminal device 101 , the second terminal device 102 , and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages and the like. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (examples only).

第一终端设备101、第二终端设备102、第三终端设备103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers etc.

服务器105可以是提供各种服务的服务器,例如对用户利用第一终端设备101、第二终端设备102、第三终端设备103所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。The server 105 may be a server that provides various services, such as a background management server that supports websites browsed by users using the first terminal device 101 , the second terminal device 102 , and the third terminal device 103 (just an example). The background management server can analyze and process received data such as user requests, and feed back processing results (such as webpages, information, or data obtained or generated according to user requests) to the terminal device.

需要说明的是,本公开实施例所提供的用于消息队列的健康巡检方法一般可以由服务器105执行。相应地,本公开实施例所提供的用于消息队列的健康巡检装置一般可以设置于服务器105中。本公开实施例所提供的用于消息队列的健康巡检方法也可以由不同于服务器105且能够与第一终端设备101、第二终端设备102、第三终端设备103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的用于消息队列的健康巡检系统也可以设置于不同于服务器105且能够与第一终端设备101、第二终端设备102、第三终端设备103和/或服务器105通信的服务器或服务器集群中。It should be noted that, generally, the health inspection method for message queues provided by the embodiments of the present disclosure may be executed by the server 105 . Correspondingly, the health inspection device for message queues provided by the embodiments of the present disclosure can generally be set in the server 105 . The health inspection method for message queues provided by the embodiments of the present disclosure may also be implemented by an A server or server cluster executes. Correspondingly, the health inspection system for message queues provided by the embodiments of the present disclosure may also be set different from the server 105 and be able to communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or Server 105 communicates with a server or server cluster.

备选地,本公开实施例所提供的用于消息队列的健康巡检方法也可以由第一终端设备101、第二终端设备102或第三终端设备103执行,或者也可以由不同于第一终端设备101、第二终端设备102或第三终端设备103的其他终端设备执行。相应地,本公开实施例所提供的用于消息队列的健康巡检装置也可以设置于第一终端设备101、第二终端设备102或第三终端设备103中,或设置于不同于第一终端设备101、第二终端设备102或第三终端设备103的其他终端设备中。Alternatively, the health inspection method for message queues provided by the embodiments of the present disclosure may also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or may also be executed by an Other terminal devices of the terminal device 101, the second terminal device 102 or the third terminal device 103 execute. Correspondingly, the health inspection device for message queues provided by the embodiments of the present disclosure may also be set in the first terminal device 101, the second terminal device 102, or the third terminal device 103, or be set in a device different from the first terminal device. In other terminal devices of the device 101, the second terminal device 102 or the third terminal device 103.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.

图2示意性示出了根据本公开实施例的用于消息队列的健康巡检方法的流程图。Fig. 2 schematically shows a flowchart of a health inspection method for a message queue according to an embodiment of the present disclosure.

如图2所示,该方法包括操作S201~S203。As shown in Fig. 2, the method includes operations S201-S203.

在操作S201,获取在巡检平台中部署的巡检任务,巡检任务被配置有预设执行频率。In operation S201, the inspection task deployed on the inspection platform is obtained, and the inspection task is configured with a preset execution frequency.

根据本公开的实施例,巡检任务表征对指定的MQ服务器的消息队列进行检测的任务。According to an embodiment of the present disclosure, the inspection task represents a task of detecting a message queue of a specified MQ server.

根据本公开的实施例,可以针对与所有业务类型对应的MQ服务器部署巡检任务,此时可以实现对所有的MQ服务器配置相同的预设执行频率,对所有的MQ服务器以相同的预设执行频率进行巡检。According to the embodiment of the present disclosure, the patrol task can be deployed for the MQ servers corresponding to all business types. At this time, the same preset execution frequency can be configured for all MQ servers, and the same preset execution can be performed for all MQ servers. Frequency inspections.

根据本公开的实施例,还可以针对与多个业务类型各自对应的MQ服务器分别部署巡检任务,此时可以实现对与多个业务类型各自对应的MQ服务器分别配置预设执行频率,对与多个业务类型各自对应的MQ服务器以各自的预设执行频率进行巡检。According to the embodiments of the present disclosure, patrol tasks can also be deployed respectively for the MQ servers corresponding to multiple service types respectively. At this time, the preset execution frequencies can be respectively configured for the MQ servers corresponding to the multiple service types, and for the MQ servers corresponding to the multiple service types. The MQ servers corresponding to multiple business types perform inspections at their respective preset execution frequencies.

根据本公开的实施例,可以根据业务的重要程度,设置不同的预设执行频率。According to an embodiment of the present disclosure, different preset execution frequencies may be set according to the importance of the business.

根据本公开的实施例,预设执行频率例如可以为一天一次,也可以为一分钟一次,本公开的实施例不对具有的执行频率进行限定,可以根据实际情况进行选择。According to the embodiment of the present disclosure, the preset execution frequency may be, for example, once a day or once a minute. The embodiment of the present disclosure does not limit the execution frequency, which may be selected according to actual conditions.

在操作S202,从配置管理平台中获取设置有消息队列的服务器的清单信息,其中,清单信息中的服务器预先部署有包含消息队列指标的检查脚本。In operation S202, the list information of servers configured with message queues is obtained from the configuration management platform, wherein the servers in the list information are pre-deployed with check scripts containing message queue indicators.

根据本公开的实施例,配置管理平台(Configuration Management Database,CMDB)表征可以对跨平台服务器进行批量管理的平台。According to an embodiment of the present disclosure, a configuration management platform (Configuration Management Database, CMDB) represents a platform that can manage cross-platform servers in batches.

根据本公开的实施例,CMDB可以记载业务类型信息、与各个业务类型相关的集群信息、与各个业务类型相关的MQ服务器信息等,其中,MQ服务器信息可以包括MQ服务器IP地址。According to an embodiment of the present disclosure, the CMDB may record service type information, cluster information related to each service type, MQ server information related to each service type, etc., wherein the MQ server information may include the MQ server IP address.

根据本公开的实施例,消息队列指标表征保障消息队列正常传输信息的指标。According to an embodiment of the present disclosure, the message queue index represents an index for ensuring normal transmission of information by the message queue.

根据本公开的实施例,服务器的清单信息表征包括待巡检的MQ服务器的信息表,服务器的清单信息中包括的服务器可以为配置管理平台下的所有MQ服务器,也可以为与某一类业务相关的MQ服务器。According to an embodiment of the present disclosure, the list information of the server represents an information table including the MQ server to be inspected, and the servers included in the list information of the server may be all MQ servers under the configuration management platform, or may be related to a certain type of business The associated MQ server.

根据本公开的实施例,可以根据巡检任务中被配置的待检测业务类型的信息,从配置管理平台中获取与待检测的业务类型相关的设置有消息队列的服务器的清单信息。According to the embodiment of the present disclosure, according to the information of the service type to be detected configured in the inspection task, the list information of the servers configured with message queues related to the service type to be detected can be obtained from the configuration management platform.

根据本公开的实施例,在巡检任务的默认状态下,可以不对待检测业务类型进行配置,此时,默认对与所有业务类型相关的MQ服务器进行巡检。According to the embodiment of the present disclosure, in the default state of the inspection task, the service type to be detected may not be configured, and at this time, the MQ server related to all service types is patrolled by default.

在操作S203,根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的服务器的消息队列进行巡检,得到健康巡检结果。In operation S203, according to the preset execution frequency of the inspection task and the inspection script, the message queue of the server in the list information is inspected according to the message queue index, and a health inspection result is obtained.

根据本公开的实施例,健康巡检结果可以包括已经检测的每个MQ服务器的健康状态及异常状态。According to an embodiment of the present disclosure, the health inspection result may include the detected health status and abnormal status of each MQ server.

根据本公开的实施例,可以根据巡检任务的预设执行频率和检查脚本,对清单信息中的服务器的消息队列的消息队列指标进行巡检,得到清单信息中的服务器的消息队列是否存在异常的结果。According to the embodiment of the present disclosure, according to the preset execution frequency of the inspection task and the inspection script, the message queue index of the server's message queue in the list information can be inspected to obtain whether there is an abnormality in the server's message queue in the list information the result of.

根据本公开的实施例,通过获取在巡检平台中部署的巡检任务,巡检任务被配置有预设执行频率,得到巡检任务中包括的待检测的业务类型及与待检测的业务类型相关的预设执行频率,然后根据待检测的业务类型,从配置管理平台中获取与待检测业务类型相关的设置有消息队列的服务器的清单信息,其中,清单信息中的服务器预先部署有包含消息队列指标的检查脚本,设置有消息队列的服务器为MQ服务器,接着根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的MQ服务器的消息队列进行巡检,得到健康巡检结果,实现根据巡检任务的预设执行频率和检查脚本,对清单信息中的MQ服务器的消息队列的消息队列指标进行自动巡检,得到清单信息中的MQ服务器的消息队列是否存在异常指标的检测结果,提高对清单信息中的MQ服务器的消息队列的消息队列指标进行巡检的效率,实现快速对大规模的MQ服务器的消息队列的消息队列指标进行检查,及时在大规模的MQ服务器的消息队列中发现异常的消息队列。According to the embodiment of the present disclosure, by acquiring the inspection task deployed in the inspection platform, the inspection task is configured with a preset execution frequency, and the business type to be detected included in the inspection task and the business type to be detected are obtained. Related preset execution frequency, and then according to the service type to be detected, obtain the list information of the servers with message queues related to the service type to be detected from the configuration management platform, wherein, the servers in the list information are pre-deployed with messages containing The check script of the queue index, set the server with the message queue as the MQ server, and then according to the preset execution frequency and check script of the inspection task, inspect the message queue of the MQ server in the list information according to the message queue index, and obtain the health Inspection results, realize automatic inspection of the message queue indicators of the MQ server's message queue in the list information according to the preset execution frequency and inspection script of the inspection task, and obtain whether the message queue of the MQ server in the list information is abnormal The detection results of the indicators improve the efficiency of the inspection of the message queue indicators of the message queues of the MQ server in the list information, and realize the rapid inspection of the message queue indicators of the message queues of the large-scale MQ servers. An abnormal message queue was found in the server's message queue.

根据本公开的实施例,消息队列指标包括第一类指标和第二类指标,第一类指标表征由用户的错误操作导致清单信息中的服务器的消息队列的信息传输异常的指标,第二类指标表征使清单信息中的服务器的消息队列进行正常传输信息的必要指标。According to an embodiment of the present disclosure, the message queue indicators include a first-type indicator and a second-type indicator. The first-type indicator represents an indicator of an abnormal information transmission of the server’s message queue in the list information caused by a user’s wrong operation, and the second-type The index represents the necessary index for the message queue of the server in the list information to transmit information normally.

根据本公开的实施例,根据消息队列指标中的第一类指标可以监测用户的错误操作对清单信息中的MQ服务器的消息队列的影响,根据消息队列指标中的第二类指标可以监测清单信息中的MQ服务器的消息队列的必要指标是否开启,消息队列指标中的第一类指标与第二类指标从不同的方面保障了清单信息中的MQ服务器的消息队列的健康状态。According to the embodiment of the present disclosure, according to the first type of indicators in the message queue indicators, the influence of the user's wrong operation on the message queue of the MQ server in the list information can be monitored, and according to the second type of indicators in the message queue indicators, the list information can be monitored Whether the necessary indicators of the message queue of the MQ server in the list are enabled, the first type of indicators and the second type of indicators in the message queue indicators guarantee the health status of the message queue of the MQ server in the list information from different aspects.

根据本公开的实施例,根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的服务器的消息队列进行巡检,得到健康巡检结果包括:According to the embodiment of the present disclosure, according to the preset execution frequency of the inspection task and the inspection script, the message queue of the server in the list information is inspected according to the message queue index, and the health inspection results obtained include:

获取清单信息中的服务器的日志信息;Obtain the log information of the server in the list information;

根据日志信息,得到清单信息中的服务器的消息队列的第一类指标的指标值,其中,第一类指标的指标值包括客户端的用户密码输错次数、用户的当前状态以及用户最后一次输错密码的时间;According to the log information, the index value of the first type of index of the server's message queue in the list information is obtained, where the index value of the first type of index includes the number of times the client's user password is entered incorrectly, the current status of the user, and the last time the user entered an error password time;

根据第一类指标的指标值,得到健康巡检结果。According to the index value of the first type of index, the health inspection result is obtained.

根据本公开的实施例,日志信息表征记录着与清单信息中的MQ服务器相关的所有活动的文本信息。According to an embodiment of the present disclosure, the log information represents text information recording all activities related to the MQ server in the list information.

根据本公开的实施例,日志信息可以包括用户执行的与MQ服务器的消息队列相关的操作的信息,因此,通过日志信息,可以得到与MQ服务器的消息队列相关的用户的密码输错次数、用户的当前状态以及用户最后一次输错密码的时间。According to an embodiment of the present disclosure, the log information may include information about operations performed by the user related to the message queue of the MQ server. Therefore, through the log information, the number of password input errors of the user related to the message queue of the MQ server, the user The current state of , and the last time the user entered an incorrect password.

根据本公开的实施例,在通过第一类指标的指标值得到用户的当前状态、用户最后一次输错密码的时间以及用户密码输错次数存在大于等于预定次数情况下,认为清单信息中的MQ服务器的消息队列存在异常指标。According to the embodiment of the present disclosure, when the current state of the user, the time when the user entered the wrong password for the last time, and the number of times the user entered the wrong password is greater than or equal to the predetermined number of times obtained through the index value of the first type of index, the MQ in the list information is considered The server's message queue has abnormal indicators.

根据本公开的实施例,可以在用户的密码输错次数大于等于预定次数的情况下,使清单信息中的MQ服务器的消息队列不可用,以保障客户在MQ服务器中的信息的安全,因此,在检测到日志信息中包括有用户的密码输错次数大于等于阈值次数的情况,需要根据密码输错次数、用户的当前状态以及用户最后一次输错密码的时间,开启清单信息中的MQ服务器的消息队列,使清单信息中的MQ服务器的消息队列能够在处理后正常使用。According to the embodiment of the present disclosure, when the user's password input error is greater than or equal to the predetermined number of times, the message queue of the MQ server in the list information can be made unavailable to ensure the security of the client's information in the MQ server. Therefore, When it is detected that the log information includes the number of times the user entered wrong passwords greater than or equal to the threshold number of times, it is necessary to enable the MQ server in the list information based on the number of wrong passwords entered, the current status of the user, and the time when the user entered the wrong password last time. Message queue, so that the message queue of the MQ server in the list information can be used normally after processing.

根据本公开的实施例,例如,可以在用户的密码输错次数大于等于3的情况下,使清单信息中的MQ服务器的消息队列不可用。然后可以根据用户的当前状态以及用户最后一次输错密码的时间,设置使清单信息中的MQ服务器的消息队列能够正常使用的时间阈值,例如一天,在达到时间阈值的情况下,正常开启清单信息中的MQ服务器的消息队列,使清单信息中的MQ服务器的消息队列可以正常使用。According to the embodiments of the present disclosure, for example, when the user's password input error times is greater than or equal to 3, the message queue of the MQ server in the list information may be made unavailable. Then, according to the current status of the user and the time when the user entered the wrong password for the last time, set the time threshold for the normal use of the message queue of the MQ server in the list information, for example, one day. When the time threshold is reached, the list information will be opened normally The message queue of the MQ server in the list information, so that the message queue of the MQ server in the list information can be used normally.

根据本公开的实施例,通过获取清单信息中的服务器即MQ服务器的日志信息,然后根据日志信息,得到清单信息中的MQ服务器的消息队列的第一类指标的指标值,其中,第一类指标的指标值包括客户端的用户密码输错次数、用户的当前状态以及用户最后一次输错密码的时间,根据第一类指标的指标值,得到健康巡检结果,实现对清单信息中的MQ服务器的消息队列的第一类指标的指标值进行自动巡检,及时发现因用户的错误操作对清单信息中的MQ服务器的消息队列的影响,使得后续可以根据第一类指标的指标值包括的用户密码输错次数、用户的当前状态以及用户最后一次输错密码的时间及时开启清单信息中的MQ服务器的消息队列,使清单信息中的MQ服务器的消息队列可以正常使用。According to an embodiment of the present disclosure, by obtaining the log information of the server in the list information, that is, the MQ server, and then according to the log information, the index value of the first type of index of the message queue of the MQ server in the list information is obtained, wherein the first type The index value of the index includes the number of wrong password input of the client, the current status of the user, and the time when the user entered the wrong password for the last time. According to the index value of the first type of index, the health inspection result is obtained, and the MQ server in the list information The index value of the first type of index of the message queue is automatically inspected, and the influence of the user's wrong operation on the message queue of the MQ server in the list information is discovered in time, so that the subsequent users can be included according to the index value of the first type of index The number of wrong passwords entered, the current status of the user, and the time when the user entered the wrong password for the last time open the message queue of the MQ server in the list information in time, so that the message queue of the MQ server in the list information can be used normally.

根据本公开的实施例,根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的服务器的消息队列进行巡检,得到健康巡检结果包括:According to the embodiment of the present disclosure, according to the preset execution frequency of the inspection task and the inspection script, the message queue of the server in the list information is inspected according to the message queue index, and the health inspection results obtained include:

获取清单信息中的服务器的配置文件;Obtain the configuration file of the server in the manifest information;

对配置文件中的配置信息与第二类指标的指标值进行比较,得到比较结果,其中,第二类指标的指标值包括以下至少之一:清单信息中的服务器的传输控制协议是否设置为长链接、接收方服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方服务器是否采用建立新的通道、新入进程等待老进程结束的秒数是否等于预设值以及服务器对采用新的通道进行自检测的设置是否开启;The configuration information in the configuration file is compared with the index value of the second type of index to obtain the comparison result, wherein the index value of the second type of index includes at least one of the following: whether the transmission control protocol of the server in the list information is set to long Link, when the receiver server receives a channel connection request and the process related to the channel exists, whether the receiver server adopts to establish a new channel, whether the number of seconds for the new process to wait for the old process to end is equal to the preset value, and the server’s Whether the setting of using a new channel for self-test is enabled;

根据比较结果,得到健康巡检结果。According to the comparison result, the health inspection result is obtained.

根据本公开的实施例,配置文件表征记录清单信息中的MQ服务器的所有配置的文件。According to an embodiment of the present disclosure, a configuration file represents a file recording all configurations of an MQ server in manifest information.

根据本公开的实施例,新入进程等待老进程结束的秒数的预设值例如可以为30s、40s、1min等,本公开的实施例不对具体的预设值进行限定,可以根据实际情况进行选择。According to the embodiment of the present disclosure, the preset value of the number of seconds for the new process to wait for the end of the old process can be, for example, 30s, 40s, 1min, etc. The embodiment of the present disclosure does not limit the specific preset value, which can be selected according to the actual situation .

根据本公开的实施例,在配置文件中的配置信息与第二类指标的指标值一致的情况下,认为清单信息中的MQ服务器的消息队列处于健康状态,在配置文件中的配置信息与第二类指标的指标值中的任一项不一致的情况下,认为清单信息中的MQ服务器的消息队列处于异常状态。According to an embodiment of the present disclosure, when the configuration information in the configuration file is consistent with the index value of the second type of index, it is considered that the message queue of the MQ server in the list information is in a healthy state, and the configuration information in the configuration file is consistent with the second type of index value. If any of the index values of the second type of index is inconsistent, it is considered that the message queue of the MQ server in the list information is in an abnormal state.

根据本公开的实施例,检测清单信息中的服务器即MQ服务器的传输控制协议(Transmission Control Protocol,TCP)是否设置为长链接例如可以为:检测清单信息中的MQ服务器的检查死连接的机制keepAlive是否设置为YES。在keepAlive设置为YES的情况下,TCP被设置为长连接,此时使用操作系统的TCP/IP监测与MQ服务器的消息队列对应的通道进行连接的另一方服务器的消息队列的通道是否可用,如果不设置,与消息队列对应的通道连接会被重置,使得消息队列传输信息异常。According to an embodiment of the present disclosure, whether the transmission control protocol (Transmission Control Protocol, TCP) of the MQ server in the detection list information is set to a long link can be, for example, the mechanism keepAlive for checking the dead connection of the MQ server in the detection list information Whether to set to YES. When keepAlive is set to YES, TCP is set as a long connection. At this time, use the TCP/IP of the operating system to monitor whether the channel of the message queue of the other server connected to the channel corresponding to the message queue of the MQ server is available. If If it is not set, the channel connection corresponding to the message queue will be reset, making the transmission information of the message queue abnormal.

根据本公开的实施例,检测接收方服务器即MQ服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方MQ服务器是否采用建立新的通道例如可以为:检测接收方MQ服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方MQ服务器的消息队列的通道属性AdoptNewMCA是否设置为ALL。在AdoptNewMCA设置为ALL的情况下,接收方MQ服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方MQ服务器采用建立新的通道。According to an embodiment of the present disclosure, when the receiver server, that is, the MQ server, receives a channel connection request and the process related to the channel exists, whether the receiver MQ server uses to establish a new channel can be, for example: Detect the receiver MQ When the server receives the request to establish a channel connection and the process related to the channel exists, whether the channel attribute AdoptNewMCA of the message queue of the receiving MQ server is set to ALL. When AdoptNewMCA is set to ALL, when the receiving MQ server receives a channel connection request and the process related to the channel exists, the receiving MQ server adopts to establish a new channel.

根据本公开的实施例,检测新入进程等待老进程结束的秒数是否等于预设值例如可以为:检测与消息队列相关的新通道等待旧通道结束的时间AdoptNewMCATimeOut的值是否等于预设值。在AdoptNewMCATimeOut的值等于预设值的情况下,可以保障消息队列传输信息正常。According to an embodiment of the present disclosure, detecting whether the number of seconds that a new process waits for an old process to end is equal to a preset value may be, for example: detecting whether the value of AdoptNewMCATimeOut that a new channel related to a message queue waits for an old channel to end is equal to a preset value. In the case that the value of AdoptNewMCATimeOut is equal to the preset value, it can ensure that the message queue transmits information normally.

根据本公开的实施例,检查服务器即MQ服务器对采用新的通道进行自检测的设置是否开启例如可以为:检查是否开启对与MQ服务器的消息队列相关的采用新的通道进行自检测的设置AdoptNewMCACheck是否设置为ALL,在AdoptNewMCACheck设置为ALL的情况下,对采用新的通道进行自检测的设置为开启状态,可以保障消息队列传输信息正常。According to an embodiment of the present disclosure, whether the check server, that is, whether the MQ server self-testing setting for adopting a new channel is enabled, for example, may be: checking whether the setting AdoptNewMCACheck for adopting a new channel for self-testing related to the message queue of the MQ server is enabled Whether it is set to ALL, when AdoptNewMCACheck is set to ALL, the setting of adopting new channel for self-test is enabled, which can ensure the normal transmission of information in the message queue.

根据本公开的实施例,通过获取清单信息中的服务器即MQ服务器的配置文件,然后对配置文件中的配置信息与第二类指标的指标值进行比较,得到比较结果,根据比较结果,得到健康巡检结果,实现对清单信息中的MQ服务器的消息队列的第二类指标的指标值进行自动巡检,及时发现清单信息中的MQ服务器的消息队列的必要指标是否开启,在根据健康巡检结果发现清单信息中的MQ服务器的消息队列的必要指标未开启的情况下,后续可以及时开启该消息队列指标,使清单信息中的MQ服务器的消息队列可以正常使用。According to the embodiment of the present disclosure, by obtaining the configuration file of the server in the list information, that is, the MQ server, and then comparing the configuration information in the configuration file with the index value of the second type of index, the comparison result is obtained, and according to the comparison result, the health The result of the inspection is to realize the automatic inspection of the index values of the second-type indicators of the message queue of the MQ server in the list information, and to find out in time whether the necessary indicators of the message queue of the MQ server in the list information are enabled. According to the health inspection It turns out that if the necessary indicator of the message queue of the MQ server in the list information is not enabled, the message queue indicator can be enabled in time, so that the message queue of the MQ server in the list information can be used normally.

图3示意性示出了根据本公开实施例的消息队列指标。Fig. 3 schematically shows message queue indicators according to an embodiment of the present disclosure.

如图3所示,与消息队列指标300包括第一类指标310以及第二类指标320。与第一类指标310对应的指标值又包括用户密码输错次数311、用户的当前状态312以及用户最后一次输错密码的时间313。与第二类指标320对应的指标值包括清单信息中的服务器即MQ服务器的传输控制协议是否设置为长链接321、接收方服务器即MQ服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方MQ服务器是否采用建立新的通道322、新入进程等待老进程结束的秒数是否等于预设值323以及MQ服务器即对采用新的通道进行自检测的设置是否开启324。As shown in FIG. 3 , the message queue indicator 300 includes a first-type indicator 310 and a second-type indicator 320 . The index values corresponding to the first type of index 310 include the number of times 311 of user password input errors, the user's current status 312 and the time 313 of the user's last input error password. The index value corresponding to the second type of index 320 includes whether the transmission control protocol of the server in the list information, that is, the MQ server, is set to a long link 321, and whether the receiver server, that is, the MQ server, receives a channel connection request and there are processes related to the channel. Under the situation, whether the receiver MQ server adopts to establish new channel 322, whether the second number that the new incoming process waits for the old process to finish is equal to the preset value 323 and whether the MQ server promptly adopts the setting of new channel to carry out self-test to open 324.

如图3所示,根据消息队列指标中的第一类指标310可以监测用户的错误操作对清单信息中的服务器的消息队列的影响,根据消息队列指标中的第二类指标320可以监测清单信息中的服务器的消息队列的必要指标是否开启,消息队列指标中的第一类指标310与第二类指标320从不同的方面保障了清单信息中的服务器的消息队列的健康状态。As shown in Figure 3, according to the first type of indicators 310 in the message queue indicators, the influence of the user's wrong operation on the message queue of the server in the list information can be monitored, and according to the second type of indicators 320 in the message queue indicators, the list information can be monitored Whether the necessary indicators of the server's message queue in the message queue are enabled, the first type of indicators 310 and the second type of indicators 320 in the message queue indicators ensure the health status of the server's message queue in the list information from different aspects.

根据本公开的实施例,包含消息队列指标的检查脚本根据如下步骤在清单信息中的服务器中进行预先部署:According to an embodiment of the present disclosure, the check script containing the message queue indicator is pre-deployed in the server in the inventory information according to the following steps:

根据业务需求编写包含消息队列指标的初始检查脚本;Write an initial check script that includes message queue metrics based on business requirements;

通过脚本管理平台对初始检查脚本进行脚本发布;Script release of the initial inspection script through the script management platform;

对初始检查脚本进行功能测试,得到通过功能测试的检查脚本;Perform a functional test on the initial check script to obtain a check script that passes the functional test;

将检查脚本提交到脚本库;Submit the check script to the script repository;

通过脚本管理平台按照预定时间将脚本库中的检查脚本部署到清单信息中的服务器中。Deploy the inspection scripts in the script library to the servers in the inventory information according to the scheduled time through the script management platform.

根据本公开的实施例,对初始检查脚本进行功能测试包括对初始脚本的编码格式、输出格式以及适配性等进行测试,以保证根据初始检查脚本得到的检查脚本的正确性。According to an embodiment of the present disclosure, performing a functional test on the initial inspection script includes testing the encoding format, output format, and adaptability of the initial script, so as to ensure the correctness of the inspection script obtained according to the initial inspection script.

根据本公开的实施例,对初始检查脚本进行功能测试包括对初始脚本的编码格式、输出格式以及适配性等进行测试,以保证根据初始检查脚本得到的检查脚本的正确性。According to an embodiment of the present disclosure, performing a functional test on the initial inspection script includes testing the encoding format, output format, and adaptability of the initial script, so as to ensure the correctness of the inspection script obtained according to the initial inspection script.

根据本公开的实施例,预定时间可以为用户对与清单信息中的服务器的消息队列执行操作较少的时间段,预定时间例如可以为凌晨12点、凌晨1点或凌晨2点等,本公开的实施例不对具体的预定时间进行限定,可以根据实际情况进行选择。According to an embodiment of the present disclosure, the predetermined time may be a period of time when the user performs few operations on the message queue of the server in the list information, and the predetermined time may be, for example, 12 am, 1 am or 2 am in the morning, etc., the present disclosure The embodiment does not limit the specific predetermined time, which can be selected according to the actual situation.

图4示意性示出了根据本公开的实施例的对服务器部署检查脚本的流程图。Fig. 4 schematically shows a flow chart of deploying a check script to a server according to an embodiment of the present disclosure.

如图4所示,在步骤410,运维人员根据业务需求编写包含消息队列指标的初始检查脚本,在步骤420,通过脚本管理平台对初始检查脚本进行脚本发布,在步骤430,对初始检查脚本进行功能测试,得到通过功能测试的检查脚本,在步骤440,将检查脚本提交到脚本库,在步骤450,通过脚本管理平台按照预定时间将脚本库中的检查脚本部署到清单信息中的服务器即MQ服务器中。As shown in Figure 4, in step 410, the operation and maintenance personnel write an initial check script containing message queue indicators according to business requirements. In step 420, the script management platform publishes the script for the initial check script. Carry out the function test, obtain the check script that passes the function test, in step 440, submit the check script to the script library, and in step 450, deploy the check script in the script library to the server in the list information according to the scheduled time through the script management platform. In the MQ server.

根据本公开的实施例,通过根据业务需求编写包含消息队列指标的初始检查脚本,得到与每个业务相关的包含消息队列指标的初始检查脚本,然后通过脚本管理平台对初始检查脚本进行脚本发布,对初始检查脚本进行功能测试,得到通过功能测试的检查脚本,得到可以对与业务相关的清单信息中的服务器的消息队列进行消息队列指标检测的检查脚本,然后将通过功能测试的检查脚本提交到脚本库,以便后续可以根据通过功能测试的检查脚本对与业务相关的清单信息中的服务器即MQ服务器的消息队列自动进行消息队列指标巡检。According to an embodiment of the present disclosure, by writing an initial inspection script containing message queue indicators according to business requirements, an initial inspection script containing message queue indicators related to each business is obtained, and then the initial inspection script is published through the script management platform, Perform a functional test on the initial check script, obtain a check script that passes the functional test, obtain a check script that can perform message queue indicator detection on the message queue of the server in the business-related list information, and then submit the check script that passes the functional test to Script library, so that the message queue indicators of the server in the business-related list information, that is, the message queue of the MQ server, can be automatically inspected based on the inspection script that has passed the functional test.

根据本公开的实施例,上述用于消息队列的健康巡检方法还包括:According to an embodiment of the present disclosure, the above health inspection method for message queues further includes:

将健康度巡检结果返回给巡检平台;Return the health inspection results to the inspection platform;

将健康度巡检结果存储到巡检结果数据库中。Store the health inspection result in the inspection result database.

根据本公开的实施例,巡检结果数据库例如可以为关系型数据库Mysql数据库,实现快速记录健康度巡检结果及检索健康度巡检结。According to an embodiment of the present disclosure, the inspection result database may be, for example, a relational database Mysql database, which realizes rapid recording of health inspection results and retrieval of health inspection results.

根据本公开的实施例,将健康度巡检结果返回给巡检平台,将健康度巡检结果存储到巡检结果数据库中,实现利用巡检结果数据库对健康度巡检结果进行记录保存,在清单信息中的服务器即MQ服务器的消息队列出现问题较多的情况下,可以根据巡检结果数据库对健康度巡检结果进行查询,然后按存储顺序对出现问题的清单信息中的MQ服务器的消息队列进行处理。According to the embodiment of the present disclosure, the health degree inspection result is returned to the inspection platform, and the health degree inspection result is stored in the inspection result database, so that the health inspection result database can be used to record and save the health degree inspection result. If there are many problems in the message queue of the server in the list information, that is, the MQ server, you can query the health inspection result according to the inspection result database, and then check the messages of the MQ server in the list information in which the problem occurs in the order of storage. queue for processing.

根据本公开的实施例,上述用于消息队列的健康巡检方法还包括:According to an embodiment of the present disclosure, the above health inspection method for message queues further includes:

根据健康度巡检结果定位存在异常指标的服务器;Locate servers with abnormal indicators based on health inspection results;

根据存在异常指标的服务器及健康度巡检结果,对存在异常指标的服务器进行处理。According to the servers with abnormal indicators and the health inspection results, the servers with abnormal indicators are processed.

根据本公开的实施例,通过根据健康度巡检结果定位存在异常指标的服务器即MQ服务器,然后根据存在异常指标的MQ服务器及健康度巡检结果,对存在异常指标的MQ服务器进行处理,实现自动定位异常指标的MQ服务器,并对异常指标的MQ服务器进行处理,提高对存在异常指标的MQ服务器的处理效率。According to the embodiment of the present disclosure, by locating the server with abnormal indicators, that is, the MQ server, according to the health inspection results, and then processing the MQ servers with abnormal indicators according to the MQ servers with abnormal indicators and the health inspection results, to achieve Automatically locate the MQ server with abnormal indicators, and process the MQ server with abnormal indicators, and improve the processing efficiency of MQ servers with abnormal indicators.

根据本公开的实施例,对存在异常指标的MQ服务器进行处理包括将存在异常指标的MQ服务器通过邮件发送给相关运维人员及通过监控系统对存在异常指标的服务器进行预警,提醒相关运维人员及时对存在异常指标的MQ服务器进行处理。According to the embodiment of the present disclosure, processing the MQ server with abnormal indicators includes sending the MQ server with abnormal indicators to the relevant operation and maintenance personnel through email and warning the server with abnormal indicators through the monitoring system to remind the relevant operation and maintenance personnel Timely handle MQ servers with abnormal indicators.

图5示意性示出了根据本公开另一实施例的用于消息队列的健康巡检方法的流程图。Fig. 5 schematically shows a flowchart of a method for health inspection of a message queue according to another embodiment of the present disclosure.

如图5所示,运维人员预先在巡检平台部署巡检任务,然后为巡检任务配置巡检任务执行频率即预设执行频率。As shown in Figure 5, the operation and maintenance personnel deploy inspection tasks on the inspection platform in advance, and then configure the inspection task execution frequency for the inspection task, that is, the preset execution frequency.

如图5所示,在步骤510,获取在巡检平台中部署的巡检任务,得到巡检任务中被配置的预设执行频率,在步骤520,在配置管理平台CMDB获取设置有消息队列的服务器即MQ服务器的清单信息,并根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的MQ服务器的消息队列进行巡检,得到健康巡检结果,在步骤530,将健康巡检结果存储到Mysql数据库,在步骤540,从Mysql数据库中提取健康巡检结果,在步骤550,根据健康度巡检结果定位存在异常指标的MQ服务器,在步骤560,将对存在异常指标的MQ服务器进行处理包括将存在异常指标的MQ服务器通过邮件发送给相关运维人员及通过监控系统对存在异常指标的MQ服务器进行预警,提醒相关运维人员及时对存在异常指标的MQ服务器进行处理。As shown in Figure 5, in step 510, the inspection task deployed in the inspection platform is obtained, and the preset execution frequency configured in the inspection task is obtained, and in step 520, the configuration management platform CMDB obtains the The server is the list information of the MQ server, and according to the preset execution frequency and inspection script of the inspection task, the message queue of the MQ server in the list information is inspected according to the message queue index, and the health inspection result is obtained. In step 530, The health inspection result is stored in the Mysql database. In step 540, the health inspection result is extracted from the Mysql database. In step 550, the MQ server with abnormal indicators is located according to the health inspection result. In step 560, the abnormal The MQ server processing of the indicators includes sending the MQ servers with abnormal indicators to the relevant operation and maintenance personnel by email and warning the MQ servers with abnormal indicators through the monitoring system, and reminding the relevant operation and maintenance personnel to timely monitor the MQ servers with abnormal indicators. deal with.

根据本公开的实施例,通过执行步骤510至560的用于消息队列的健康巡检方法,可以实现根据巡检任务的预设执行频率和检查脚本,对清单信息中的MQ服务器的消息队列的消息队列指标进行自动巡检,得到清单信息中的MQ服务器的消息队列是否存在异常指标的检测结果,提高对清单信息中的MQ服务器的消息队列的消息队列指标进行巡检的效率,实现快速对大规模的MQ服务器的消息队列的消息队列指标进行检查,及时在大规模的MQ服务器的消息队列中发现异常的消息队列,并及时将存在异常指标的MQ服务器通过邮件发送给相关运维人员及通过监控系统对存在异常指标的MQ服务器进行预警,提醒相关运维人员及时对存在异常指标的MQ服务器进行处理。According to the embodiment of the present disclosure, by executing the health inspection method for the message queue in steps 510 to 560, it can be realized that the message queue of the MQ server in the list information can be checked according to the preset execution frequency and inspection script of the inspection task. The message queue indicators are automatically inspected, and the detection results of whether there are abnormal indicators in the message queue of the MQ server in the list information are obtained, and the efficiency of the inspection of the message queue indicators of the message queue of the MQ server in the list information is improved, and the rapid detection is realized. Check the message queue indicators of the message queue of the large-scale MQ server, find abnormal message queues in the message queue of the large-scale MQ server in time, and send the MQ server with abnormal indicators to the relevant operation and maintenance personnel and Through the monitoring system, the MQ server with abnormal indicators will be warned, and the relevant operation and maintenance personnel will be reminded to deal with the MQ server with abnormal indicators in time.

需要说明的是,本公开实施例中的流程图所示的操作除非明确说明不同操作之间存在执行的先后顺序,或者不同操作在技术实现上存在执行的先后顺序,否则,多个操作之间的执行顺序可以不分先后,多个操作也可以同时执行。It should be noted that, unless the operations shown in the flow charts in the embodiments of the present disclosure clearly indicate that there is a sequence of execution between different operations, or that there is a sequence of execution of different operations in terms of technical implementation, otherwise, multiple operations The order of execution can be in no particular order, and multiple operations can also be executed at the same time.

图6示意性示出了根据本公开的实施例的用于消息队列的健康巡检装置的框图。Fig. 6 schematically shows a block diagram of a health inspection device for a message queue according to an embodiment of the present disclosure.

如图6所示,用于消息队列的健康巡检装置600包括巡检任务获取模块610、服务器信息获取模块620和巡检结果得到模块630。As shown in FIG. 6 , a health inspection device 600 for message queues includes an inspection task acquisition module 610 , a server information acquisition module 620 and an inspection result acquisition module 630 .

巡检任务获取模块610,用于获取在巡检平台中部署的巡检任务,巡检任务被配置有预设执行频率。The inspection task acquiring module 610 is configured to acquire the inspection tasks deployed in the inspection platform, where the inspection tasks are configured with a preset execution frequency.

服务器信息获取模块620,用于从配置管理平台中获取设置有消息队列的服务器的清单信息,其中,清单信息中的服务器预先部署有包含消息队列指标的检查脚本。The server information obtaining module 620 is configured to obtain list information of servers configured with message queues from the configuration management platform, wherein the servers in the list information are pre-deployed with check scripts containing message queue indicators.

巡检结果得到模块630,用于根据巡检任务的预设执行频率和检查脚本,按照消息队列指标对清单信息中的服务器的消息队列进行巡检,得到健康巡检结果。The inspection result obtaining module 630 is configured to inspect the message queue of the server in the list information according to the preset execution frequency and inspection script of the inspection task, and obtain the health inspection result.

根据本公开的实施例,消息队列指标包括第一类指标和第二类指标,第一类指标表征由用户的错误操作导致清单信息中的服务器的消息队列的信息传输异常的指标,第二类指标表征使清单信息中的服务器的消息队列进行正常传输信息的必要指标。According to an embodiment of the present disclosure, the message queue indicators include a first-type indicator and a second-type indicator. The first-type indicator represents an indicator of an abnormal information transmission of the server’s message queue in the list information caused by a user’s wrong operation, and the second-type The index represents the necessary index for the message queue of the server in the list information to transmit information normally.

根据本公开的实施例,巡检结果得到模块包括日志信息获取子模块、第一指标值得到子模块和巡检结果第一得到子模块。According to an embodiment of the present disclosure, the inspection result obtaining module includes a log information obtaining submodule, a first index value obtaining submodule, and a first inspection result obtaining submodule.

日志信息获取子模块,用于获取清单信息中的服务器的日志信息。The log information obtaining submodule is used to obtain the log information of the server in the list information.

第一指标值得到子模块,用于根据日志信息,得到清单信息中的服务器的消息队列的第一类指标的指标值,其中,第一类指标的指标值包括客户端的用户密码输错次数、用户的当前状态以及用户最后一次输错密码的时间。The first index value obtaining sub-module is used to obtain the index value of the first type of index of the message queue of the server in the list information according to the log information, wherein the index value of the first type of index includes the number of times the user password is entered incorrectly at the client, The current status of the user and the last time the user entered an incorrect password.

巡检结果第一得到子模块,用于根据第一类指标的指标值,得到健康巡检结果。The inspection result first obtaining sub-module is used to obtain the health inspection result according to the index value of the first type of index.

根据本公开的实施例,巡检结果得到模块包括配置文件获取子模块、比较结果得到子模块和巡检结果第二得到子模块。According to an embodiment of the present disclosure, the inspection result obtaining module includes a configuration file obtaining submodule, a comparison result obtaining submodule and a second inspection result obtaining submodule.

配置文件获取子模块,用于获取清单信息中的服务器的配置文件。The configuration file acquisition submodule is used to obtain the configuration file of the server in the manifest information.

比较结果得到子模块,用于对配置文件中的配置信息与第二类指标的指标值进行比较,得到比较结果,其中,第二类指标的指标值包括以下至少之一:清单信息中的服务器的传输控制协议是否设置为长链接、接收方服务器在接收到建立通道连接请求且与通道相关的进程存在的情况下,接收方服务器是否采用建立新的通道、新入进程等待老进程结束的秒数是否等于预设值以及服务器对采用新的通道进行自检测的设置是否开启。The comparison result obtaining sub-module is used to compare the configuration information in the configuration file with the index value of the second type of index to obtain the comparison result, wherein the index value of the second type of index includes at least one of the following: the server in the list information Whether the transmission control protocol is set to a long link, when the receiving server receives a channel connection request and the process related to the channel exists, whether the receiving server uses the establishment of a new channel, the number of seconds for the new incoming process to wait for the old process to end Whether it is equal to the preset value and whether the setting of server self-test for adopting a new channel is turned on.

巡检结果第二得到子模块,用于根据比较结果,得到健康巡检结果。The inspection result second obtaining sub-module is used to obtain the health inspection result according to the comparison result.

根据本公开的实施例,包含消息队列指标的检查脚本根据如下步骤在清单信息中的服务器中进行预先部署:According to an embodiment of the present disclosure, the check script containing the message queue indicator is pre-deployed in the server in the inventory information according to the following steps:

根据业务需求编写包含消息队列指标的初始检查脚本;Write an initial check script that includes message queue metrics based on business requirements;

通过脚本管理平台对初始检查脚本进行脚本发布;Script release of the initial inspection script through the script management platform;

对初始检查脚本进行功能测试,得到通过功能测试的检查脚本;Perform a functional test on the initial check script to obtain a check script that passes the functional test;

将检查脚本提交到脚本库;Submit the check script to the script repository;

通过脚本管理平台按照预定时间将脚本库中的检查脚本部署到清单信息中的服务器中。Deploy the inspection scripts in the script library to the servers in the inventory information according to the scheduled time through the script management platform.

根据本公开的实施例,用于消息队列的健康巡检装置还包括巡检结果返回模块和巡检结果存储模块。According to an embodiment of the present disclosure, the health inspection device for message queues further includes an inspection result return module and an inspection result storage module.

巡检结果返回模块,用于将健康度巡检结果返回给巡检平台。The inspection result return module is used to return the health inspection result to the inspection platform.

巡检结果存储模块,用于将健康度巡检结果存储到巡检结果数据库中。The inspection result storage module is used to store the health inspection result in the inspection result database.

根据本公开的实施例,用于消息队列的健康巡检装置还包括服务器定位模块和处理模块。According to an embodiment of the present disclosure, the health inspection device for message queues further includes a server location module and a processing module.

服务器定位模块,用于根据健康度巡检结果定位存在异常指标的服务器。The server location module is used to locate servers with abnormal indicators according to the health inspection results.

处理模块,用于根据存在异常指标的服务器及健康度巡检结果,对存在异常指标的服务器进行处理。The processing module is used to process the servers with abnormal indicators according to the servers with abnormal indicators and the health inspection results.

根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。Modules, sub-modules, units, any multiple of sub-units according to the embodiments of the present disclosure, or at least part of the functions of any multiple of them may be implemented in one module. Any one or more of modules, submodules, units, and subunits according to the embodiments of the present disclosure may be implemented by being divided into multiple modules. Any one or more of modules, submodules, units, and subunits according to embodiments of the present disclosure may be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or hardware or firmware that may be implemented by any other reasonable means of integrating or packaging circuits, or in a combination of software, hardware, and firmware Any one of these implementations or an appropriate combination of any of them. Alternatively, one or more of the modules, submodules, units, and subunits according to the embodiments of the present disclosure may be at least partially implemented as computer program modules, and when the computer program modules are executed, corresponding functions may be performed.

例如,巡检任务获取模块610、服务器信息获取模块620和巡检结果得到模块630中的任意多个可以合并在一个模块/单元/子单元中实现,或者其中的任意一个模块/单元/子单元可以被拆分成多个模块/单元/子单元。或者,这些模块/单元/子单元中的一个或多个模块/单元/子单元的至少部分功能可以与其他模块/单元/子单元的至少部分功能相结合,并在一个模块/单元/子单元中实现。根据本公开的实施例,巡检任务获取模块610、服务器信息获取模块620和巡检结果得到模块630中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,巡检任务获取模块610、服务器信息获取模块620和巡检结果得到模块630中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。For example, any number of the inspection task acquisition module 610, the server information acquisition module 620, and the inspection result acquisition module 630 can be combined in one module/unit/subunit, or any one of the modules/units/subunits Can be split into multiple modules/units/subunits. Alternatively, at least part of the functions of one or more modules/units/subunits of these modules/units/subunits can be combined with at least part of the functions of other modules/units/subunits, and combined in one module/unit/subunit realized in. According to an embodiment of the present disclosure, at least one of the inspection task acquisition module 610, the server information acquisition module 620, and the inspection result acquisition module 630 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), programmable logic array (PLA), system-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuits, such as hardware or firmware, may be implemented, Or it may be realized by any one of software, hardware and firmware, or by an appropriate combination of any of them. Alternatively, at least one of the inspection task acquisition module 610, the server information acquisition module 620, and the inspection result acquisition module 630 may be at least partially implemented as a computer program module, and when the computer program module is executed, corresponding functions may be performed .

需要说明的是,本公开的实施例中用于消息队列的健康巡检装置部分与本公开的实施例中用于消息队列的健康巡检方法部分是相对应的,用于消息队列的健康巡检装置部分的描述具体参考用于消息队列的健康巡检方法部分,在此不再赘述。It should be noted that the part of the health inspection device used for the message queue in the embodiment of the present disclosure corresponds to the part of the health inspection method used for the message queue in the embodiment of the present disclosure, and the health inspection method for the message queue For the description of the inspection device part, please refer to the part of the health inspection method for the message queue, which will not be repeated here.

图7示意性示出了根据本公开实施例的适于实现上文描述的方法的计算机系统的框图。图7示出的计算机系统仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Fig. 7 schematically shows a block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure. The computer system shown in FIG. 7 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.

如图7所示,根据本公开实施例的计算机系统700包括处理器701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。处理器701例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器701还可以包括用于缓存用途的板载存储器。处理器701可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 7 , a computer system 700 according to an embodiment of the present disclosure includes a processor 701 that can be loaded into a random access memory (RAM) 703 according to a program stored in a read-only memory (ROM) 702 or loaded from a storage section 708 Various appropriate actions and processing are performed by the program. Processor 701 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or associated chipset and/or a special-purpose microprocessor (eg, an application-specific integrated circuit (ASIC)), and the like. Processor 701 may also include on-board memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for executing different actions of the method flow according to the embodiments of the present disclosure.

在RAM 703中,存储有系统700操作所需的各种程序和数据。处理器701、ROM 702以及RAM 703通过总线704彼此相连。处理器701通过执行ROM 702和/或RAM 703中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 702和RAM 703以外的一个或多个存储器中。处理器701也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701 , ROM 702 , and RAM 703 are connected to each other via a bus 704 . The processor 701 executes the programs in the ROM 702 and/or the RAM 703 to perform various operations according to the method flow of the embodiment of the present disclosure. It should be noted that the program may also be stored in one or more memories other than the ROM 702 and the RAM 703 . The processor 701 may also perform various operations according to the method flow of the embodiments of the present disclosure by executing programs stored in the one or more memories.

根据本公开的实施例,系统700还可以包括输入/输出(I/O)接口705,输入/输出(I/O)接口705也连接至总线704。系统700还可以包括连接至I/O接口705的以下部件中的一项或多项:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705 that is also connected to the bus 704 . System 700 may also include one or more of the following components connected to I/O interface 705: an input section 706 including a keyboard, mouse, etc.; etc.; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 710 as necessary so that a computer program read therefrom is installed into the storage section 708 as necessary.

根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读存储介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被处理器701执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。According to the embodiments of the present disclosure, the method flow according to the embodiments of the present disclosure can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable storage medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 709 and/or installed from removable media 711 . When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to the embodiments of the present disclosure, the above-described systems, devices, devices, modules, units, etc. may be implemented by computer program modules.

本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist independently without being assembled into the device/system device/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, the method according to the embodiment of the present disclosure is realized.

根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质。例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD- ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, 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.

例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 702和/或RAM 703和/或ROM 702和RAM 703以外的一个或多个存储器。For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include one or more memories other than the above-described ROM 702 and/or RAM 703 and/or ROM 702 and RAM 703 .

本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行本公开实施例所提供的方法的程序代码,当计算机程序产品在电子设备上运行时,该程序代码用于使电子设备实现本公开实施例所提供的用于消息队列的健康巡检方法。Embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program includes program codes for executing the method provided by the embodiments of the present disclosure. When the computer program product is run on an electronic device, the program The code is used to enable the electronic device to implement the health inspection method for the message queue provided by the embodiment of the present disclosure.

在该计算机程序被处理器701执行时,执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the processor 701, the above-mentioned functions defined in the system/device of the embodiment of the present disclosure are executed. According to the embodiments of the present disclosure, the above-described systems, devices, modules, units, etc. may be implemented by computer program modules.

在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分709被下载和安装,和/或从可拆卸介质711被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium, downloaded and installed through the communication part 709, and/or installed from the removable medium 711. The program code contained in the computer program can be transmitted by any appropriate network medium, including but not limited to: wireless, wired, etc., or any appropriate combination of the above.

根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to the embodiments of the present disclosure, the program codes for executing the computer programs provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, specifically, high-level procedural and/or object-oriented programming language, and/or assembly/machine language to implement these computing programs. Programming languages include, but are not limited to, programming languages such as Java, C++, python, "C" or similar programming languages. The program code can execute entirely on the user computing device, partly on the user device, partly on the remote computing device, or entirely on the remote computing device or server. In cases involving a remote computing device, 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 (for example, using an Internet service provider). business to connect via the Internet).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。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 disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. 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 they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions. Those skilled in the art can understand that various combinations and/or combinations can be made in the various embodiments of the present disclosure and/or the features described in the claims, even if such combinations or combinations are not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the various embodiments of the present disclosure and/or the features described in the claims can be combined and/or combined in various ways. All such combinations and/or combinations fall within the scope of the present disclosure.

以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the various embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims (11)

1. A health tour inspection method for a message queue, comprising:
acquiring a patrol task deployed in a patrol platform, wherein the patrol task is configured with a preset execution frequency;
acquiring list information of a server provided with a message queue from a configuration management platform, wherein the server in the list information is pre-deployed with a checking script containing a message queue index; and
and carrying out inspection on the message queue of the server in the list information according to the preset execution frequency of the inspection task and the inspection script and the message queue index to obtain a health inspection result.
2. The method of claim 1, wherein the message queue metrics include a first class of metrics that characterize metrics that cause abnormal information transmission of the message queues of the servers in the manifest information by a user's erroneous operation, and a second class of metrics that characterize metrics necessary for normal information transmission of the message queues of the servers in the manifest information.
3. The method of claim 2, wherein the performing inspection on the message queue of the server in the list information according to the message queue index according to the preset execution frequency of the inspection task and the inspection script, and obtaining a health inspection result includes:
acquiring log information of a server in the list information;
obtaining index values of first indexes of a message queue of a server in the list information according to the log information, wherein the index values of the first indexes comprise user password error transmission times of a client, the current state of a user and the last password error transmission time of the user;
and obtaining the health inspection result according to the index value of the first type index.
4. The method of claim 2, wherein the performing inspection on the message queue of the server in the list information according to the message queue index according to the preset execution frequency of the inspection task and the inspection script, and obtaining a health inspection result includes:
acquiring a configuration file of a server in the list information;
comparing the configuration information in the configuration file with the index values of the second type of indexes to obtain a comparison result, wherein the index values of the second type of indexes comprise at least one of the following: whether the transmission control protocol of the server in the list information is set to be long link, whether the receiver server adopts the establishment of a new channel, whether the number of seconds of the new process waiting for the end of the old process is equal to a preset value or not and whether the server starts the self-detection of the new channel when the receiver server receives the channel connection establishment request and the process related to the channel exists;
And obtaining the health inspection result according to the comparison result.
5. The method of claim 1, the inspection script containing message queue metrics is pre-deployed in a server in the manifest information according to the steps of:
writing an initial checking script containing the message queue index according to the service requirement;
script release is carried out on the initial inspection script through a script management platform;
performing functional test on the initial inspection script to obtain the inspection script passing the functional test;
submitting the checking script to a script library;
and deploying the checking script in the script library to a server in the list information according to preset time through a script management platform.
6. The method of claim 1, further comprising:
returning the health inspection result to the inspection platform;
and storing the health inspection result into an inspection result database.
7. The method of claim 1, further comprising:
positioning a server with abnormal indexes according to the health degree inspection result;
and processing the server with the abnormal index according to the server with the abnormal index and the health degree inspection result.
8. A health tour inspection device for a message queue, comprising:
the system comprises a patrol task acquisition module, a patrol task management module and a control module, wherein the patrol task acquisition module is used for acquiring patrol tasks deployed in a patrol platform, and the patrol tasks are configured with preset execution frequency;
the server information acquisition module is used for acquiring list information of the servers provided with the message queues from the configuration management platform, wherein the servers in the list information are pre-deployed with check scripts containing message queue indexes; and
and the inspection result obtaining module is used for inspecting the message queue of the server in the list information according to the message queue index and the preset execution frequency of the inspection task and the inspection script to obtain a health inspection result.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 7.
11. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 7 when executed.
CN202310139173.0A 2023-02-20 2023-02-20 Method, device, equipment and medium for health inspection of message queue Pending CN116136818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310139173.0A CN116136818A (en) 2023-02-20 2023-02-20 Method, device, equipment and medium for health inspection of message queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310139173.0A CN116136818A (en) 2023-02-20 2023-02-20 Method, device, equipment and medium for health inspection of message queue

Publications (1)

Publication Number Publication Date
CN116136818A true CN116136818A (en) 2023-05-19

Family

ID=86333434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310139173.0A Pending CN116136818A (en) 2023-02-20 2023-02-20 Method, device, equipment and medium for health inspection of message queue

Country Status (1)

Country Link
CN (1) CN116136818A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116933177A (en) * 2023-07-21 2023-10-24 济南浪潮数据技术有限公司 Data center overall health inspection prediction method, device and storage medium
CN119718843A (en) * 2025-03-04 2025-03-28 上交所技术有限责任公司 A multi-queue system health monitoring method based on multiple indicators

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463612A (en) * 2020-12-02 2021-03-09 中国工商银行股份有限公司 Inspection method, inspection device, electronic device and inspection medium
CN112905454A (en) * 2021-02-04 2021-06-04 郑州信大捷安信息技术股份有限公司 MQTT service testing system and method
CN114915543A (en) * 2022-05-07 2022-08-16 中国农业银行股份有限公司 Message queue monitoring method and device
CN115314360A (en) * 2022-07-27 2022-11-08 浪潮软件股份有限公司 Message queue service performance monitoring system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463612A (en) * 2020-12-02 2021-03-09 中国工商银行股份有限公司 Inspection method, inspection device, electronic device and inspection medium
CN112905454A (en) * 2021-02-04 2021-06-04 郑州信大捷安信息技术股份有限公司 MQTT service testing system and method
CN114915543A (en) * 2022-05-07 2022-08-16 中国农业银行股份有限公司 Message queue monitoring method and device
CN115314360A (en) * 2022-07-27 2022-11-08 浪潮软件股份有限公司 Message queue service performance monitoring system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周丽婕等: "《物联网技术与应用实践教程》", 31 August 2020, 华中科技大学出版社, pages: 26 *
李勇作: "《银行业信息化丛书 银行业信息安全攻防与风险管控》", 28 February 2022, 机械工业出版社, pages: 234 - 235 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116933177A (en) * 2023-07-21 2023-10-24 济南浪潮数据技术有限公司 Data center overall health inspection prediction method, device and storage medium
CN119718843A (en) * 2025-03-04 2025-03-28 上交所技术有限责任公司 A multi-queue system health monitoring method based on multiple indicators
CN119718843B (en) * 2025-03-04 2025-05-09 上交所技术有限责任公司 A multi-queue system health monitoring method based on multiple indicators

Similar Documents

Publication Publication Date Title
US11449379B2 (en) Root cause and predictive analyses for technical issues of a computing environment
CN111712813B (en) Intelligent Preprocessing of Multidimensional Time Series Data
US20200004617A1 (en) Techniques for managing and analyzing log data
US7664986B2 (en) System and method for determining fault isolation in an enterprise computing system
EP3734520B1 (en) Fault analysis and prediction using empirical architecture analytics
US11362912B2 (en) Support ticket platform for improving network infrastructures
US11789760B2 (en) Alerting, diagnosing, and transmitting computer issues to a technical resource in response to an indication of occurrence by an end user
CN113157545A (en) Method, device and equipment for processing service log and storage medium
US10362086B2 (en) Method and system for automating submission of issue reports
CN116136818A (en) Method, device, equipment and medium for health inspection of message queue
EP3168748A1 (en) System and method for monitoring performance of applications
WO2020096665A2 (en) System error detection
US11897527B2 (en) Automated positive train control event data extraction and analysis engine and method therefor
CN114490272A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114116429A (en) Abnormal log collection method, device, equipment, medium and product
CN111309585A (en) Log data testing method, device and system, electronic equipment and storage medium
US9047408B2 (en) Monitoring software execution
US10700992B1 (en) System and method for managing resources in cloud environment
CN112084114B (en) Method and apparatus for testing interfaces
US10411988B1 (en) Data injection testing
CN118035217A (en) Data processing method, device, electronic equipment and readable storage medium
US12265627B1 (en) Behavioral analysis for identification of malicious code
CN117130812A (en) System fault detection method, apparatus, device, medium and program product
CN111026612A (en) Application program operation monitoring method and device, storage medium and electronic equipment
CN114024867B (en) Network anomaly detection method and device

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