







技术领域technical field
本申请涉及测试技术领域,特别是涉及一种服务性能监控方法、装置、计算机设备和存储介质。The present application relates to the technical field of testing, and in particular, to a service performance monitoring method, apparatus, computer equipment and storage medium.
背景技术Background technique
随着计算机技术的发展,针对不同的业务场景与系统架构,性能监控需监控的对象也不一样。且不同的监控对象使用的监控脚本除CPU、内存、网络等通用的服务器性能指标之外还有各种各样的不同的指标需要监控。以往的测试工程师需要登录到不同的服务器上利用不同的命令或是监控脚本进行监控获取数据。With the development of computer technology, the objects to be monitored for performance monitoring are different for different business scenarios and system architectures. In addition to general server performance indicators such as CPU, memory, and network, the monitoring scripts used by different monitoring objects also have various indicators that need to be monitored. In the past, test engineers needed to log in to different servers and use different commands or monitoring scripts to monitor and obtain data.
而随着时代的发展,业务系统架构复杂度增加,且微服务架构兴起,使得监控工程师在性能监控期间监控服务器相关指标数据花费了大量的时间,监控数据的获取效率低。With the development of the times, the complexity of business system architecture has increased, and the microservice architecture has emerged, which makes monitoring engineers spend a lot of time monitoring server-related indicator data during performance monitoring, and the acquisition efficiency of monitoring data is low.
发明内容SUMMARY OF THE INVENTION
基于此,有必要针对上述技术问题,提供一种能够提高监控数据获取效率的服务性能监控方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a service performance monitoring method, device, computer equipment and storage medium that can improve the efficiency of monitoring data acquisition in response to the above technical problems.
一种服务性能监控方法,方法包括:A service performance monitoring method, comprising:
响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;In response to service performance monitoring configuration operations, determine the target service to be monitored and the monitoring time for the target service;
从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;Find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface;
响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;In response to the script selection operation, determine the target script, the target script is the initial script or the updated script edited and uploaded based on the initial script, or the custom script uploaded from the local;
根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。According to the monitoring time and the target script, a monitoring task is generated, and the monitoring task is sent to the server corresponding to the target service for service performance monitoring.
在其中一个实施例中,响应脚本选定操作,确定目标脚本包括:In one embodiment, in response to the script selection operation, determining the target script includes:
响应脚本选定操作,得到脚本选定操作对应的提交数据;In response to the selected operation of the script, the submitted data corresponding to the selected operation of the script is obtained;
对提交数据进行解析,确定提交数据的脚本数据类型;Analyze the submitted data to determine the script data type of the submitted data;
若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本;If the script data type is a script file, the update script edited and uploaded based on the initial script or the custom script uploaded locally will be used as the target script;
若脚本数据类型为脚本标识,则将脚本标识对应的初始脚本确定为目标脚本。If the script data type is a script identifier, the initial script corresponding to the script identifier is determined as the target script.
在其中一个实施例中,若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本之后,还包括:In one of the embodiments, if the script data type is a script file, after the update script edited and uploaded based on the initial script or the custom script uploaded from the local area is used as the target script, it further includes:
提取脚本文件对应的分类标签和脚本描述信息;Extract the classification label and script description information corresponding to the script file;
根据分类标签和脚本描述信息,确定脚本文件对应的类别;Determine the category corresponding to the script file according to the classification label and script description information;
根据类别,将脚本文件添加至脚本库。Depending on the category, add script files to the script library.
在其中一个实施例中,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控之后,还包括:In one embodiment, after the monitoring task is generated according to the monitoring time and the target script, and the monitoring task is sent to the server corresponding to the target service for service performance monitoring, the method further includes:
接收服务器执行目标脚本后反馈的执行结果;Receive the execution result fed back after the server executes the target script;
在预设的监控结果展示界面展示执行结果。Display the execution results on the preset monitoring result display interface.
在其中一个实施例中,接收服务器执行目标脚本后反馈的执行结果之后,还包括:In one embodiment, after receiving the execution result fed back after the server executes the target script, the method further includes:
按监控任务对应的目标服务,对执行结果进行存储。The execution result is stored according to the target service corresponding to the monitoring task.
在其中一个实施例中,目标服务至少包括NGINX(engine x,高性能Web和反向代理服务)、应用层、网关、缓存、微服务、消息队列、数据库中的一个。In one embodiment, the target service includes at least one of NGINX (engine x, high-performance web and reverse proxy service), an application layer, a gateway, a cache, a microservice, a message queue, and a database.
在其中一个实施例中,监控时间包括监控起止时间;In one of the embodiments, the monitoring time includes monitoring start and end time;
将监控任务发送至目标服务对应的服务器进行服务性能监控包括:Sending monitoring tasks to the server corresponding to the target service for service performance monitoring includes:
将监控任务发送至目标服务对应的服务器,以使服务器根据监控起止时间执行监控任务中的目标脚本进行服务性能监控。Send the monitoring task to the server corresponding to the target service, so that the server executes the target script in the monitoring task according to the monitoring start and end time to monitor service performance.
一种服务性能监控装置,装置包括:A service performance monitoring device, the device includes:
配置操作响应模块,用于响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;The configuration operation response module is used to respond to the service performance monitoring configuration operation, determine the target service to be monitored and the monitoring time of the target service;
脚本推送模块,用于从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;The script push module is used to find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface;
脚本确定模块,用于响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;The script determination module is used to respond to the selected operation of the script and determine the target script, the target script is the initial script or the update script edited and uploaded based on the initial script, or the custom script uploaded from the local;
性能监控模块,用于根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。The performance monitoring module is used to generate monitoring tasks according to the monitoring time and the target script, and send the monitoring tasks to the server corresponding to the target service for service performance monitoring.
一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,处理器执行计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;In response to service performance monitoring configuration operations, determine the target service to be monitored and the monitoring time for the target service;
从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;Find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface;
响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;In response to the script selection operation, determine the target script, the target script is the initial script or the updated script edited and uploaded based on the initial script, or the custom script uploaded from the local;
根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。According to the monitoring time and the target script, a monitoring task is generated, and the monitoring task is sent to the server corresponding to the target service for service performance monitoring.
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;In response to service performance monitoring configuration operations, determine the target service to be monitored and the monitoring time for the target service;
从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;Find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface;
响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;In response to the script selection operation, determine the target script, the target script is the initial script or the updated script edited and uploaded based on the initial script, or the custom script uploaded from the local;
根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。According to the monitoring time and the target script, a monitoring task is generated, and the monitoring task is sent to the server corresponding to the target service for service performance monitoring.
上述服务性能监控方法、装置、计算机设备和存储介质,通过响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面,通过脚本配置界面推送初始脚本,能够便于用户选择脚本或在原有的基础上对脚本进行编辑,简化了目标脚本的获得过程,响应脚本选定操作,确定目标脚本,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控,能够实现根据不同的服务选择不同的脚本,无需登录各个服务器即可自动监控服务性能,提高监控效率。The above-mentioned service performance monitoring method, device, computer equipment and storage medium, by responding to the service performance monitoring configuration operation, determine the target service to be monitored and the monitoring time for the target service, find the initial script corresponding to the target service from the script library, and Push the initial script to the script configuration interface, and push the initial script through the script configuration interface, which can facilitate the user to select the script or edit the script on the original basis, simplify the acquisition process of the target script, respond to the script selection operation, and determine the target script. , according to the monitoring time and the target script, generate monitoring tasks, and send the monitoring tasks to the server corresponding to the target service for service performance monitoring, which can select different scripts according to different services, and automatically monitor service performance without logging in to each server. Improve monitoring efficiency.
附图说明Description of drawings
图1为一个实施例中服务性能监控方法的应用环境图;1 is an application environment diagram of a service performance monitoring method in one embodiment;
图2为一个实施例中服务性能监控方法的流程示意图;2 is a schematic flowchart of a service performance monitoring method in one embodiment;
图3为另一个实施例中服务性能监控方法的流程示意图;3 is a schematic flowchart of a service performance monitoring method in another embodiment;
图4为又一个实施例中服务性能监控方法的流程示意图;4 is a schematic flowchart of a service performance monitoring method in another embodiment;
图5为再一个实施例中服务性能监控方法的流程示意图;5 is a schematic flowchart of a service performance monitoring method in yet another embodiment;
图6为还一个实施例中服务性能监控方法的中各项服务的分布示意图;6 is a schematic diagram of the distribution of each service in the service performance monitoring method in another embodiment;
图7为一个实施例中服务性能监控装置的结构框图;7 is a structural block diagram of an apparatus for monitoring service performance in one embodiment;
图8为一个实施例中计算机设备的内部结构图。FIG. 8 is a diagram of the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的服务性能监控方法,可以应用于如图1所示的应用环境中。其中,监控平台102通过网络与服务器104进行通信。监控平台102响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器104进行服务性能监控,接收服务器104反馈的监控结果。其中,监控平台102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The service performance monitoring method provided by the present application can be applied to the application environment shown in FIG. 1 . The
在一个实施例中,如图2所示,提供了一种服务性能监控方法,以该方法应用于图1中的监控平台为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a service performance monitoring method is provided, and the method is applied to the monitoring platform in FIG. 1 as an example for description, including the following steps:
步骤202,响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间。
服务性能监控配置操作是指用户在需要对某个服务器上的某项服务进行监控时,对监控参数的配置的过程。其中,服务性能监控配置操作包括待监控的服务的选定、监控起止时间的选定,还可以包括监控脚本的上传。监控平台通过响应用户的服务性能监控配置操作,通过用户输入的数据确定待监控的目标服务以及对目标服务的监控时间。Service performance monitoring configuration operation refers to the process of configuring monitoring parameters when a user needs to monitor a service on a server. The service performance monitoring configuration operation includes the selection of the service to be monitored, the selection of the monitoring start and end time, and the uploading of the monitoring script. The monitoring platform determines the target service to be monitored and the monitoring time of the target service through the data input by the user by responding to the user's service performance monitoring configuration operation.
在一个实施例中,可以通过预先设置的监控参数配置界面对待监控的目标服务以及对目标服务的监控时间进行配置。具体来说,用户可以基于监控参数配置界面,先选定要监控的服务器,然后选择该服务器中要监控的某项服务,待监控的服务如NGINX、应用层、网关、缓存、微服务、消息队列、数据库等。由于不同的服务具有不同的监控重点和监控逻辑,因此不同的服务需要通过不同的脚本来进行监控。In one embodiment, the target service to be monitored and the monitoring time of the target service may be configured through a preset monitoring parameter configuration interface. Specifically, the user can configure the interface based on the monitoring parameters, first select the server to be monitored, and then select a service to be monitored in the server, such as NGINX, application layer, gateway, cache, microservice, message queues, databases, etc. Since different services have different monitoring priorities and monitoring logic, different services need to be monitored through different scripts.
在另一个实施例中,也可以对不同服务器的同样的服务进行监控,通过在监控参数配置界面中新增监控任务的方式即可实现多个目标服务的选择。对于不同服务器的同样的服务,可以通过相同的脚本来监控。In another embodiment, the same service of different servers can also be monitored, and selection of multiple target services can be realized by adding a monitoring task in the monitoring parameter configuration interface. The same service on different servers can be monitored by the same script.
用户在选定了待监控的服务之后,还可以设定监控时间。其中监控时间可以是监控时长,也可以是监控起止时间。After the user has selected the service to be monitored, the monitoring time can also be set. The monitoring time may be the monitoring duration or the monitoring start and end time.
步骤204,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面。Step 204: Find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface.
脚本库是指存放脚本的数据库。脚本库中的不同类型的脚本适用于不同服务的监控。对于同一个服务,脚本库中存在一个或多个与之对应的脚本,其中,多个脚本可以是不同版本的脚本,也可以是对应不同监控指标的脚本。A script library is a database that stores scripts. Different types of scripts in the script library are suitable for monitoring of different services. For the same service, there are one or more corresponding scripts in the script library, and the multiple scripts may be scripts of different versions or scripts corresponding to different monitoring indicators.
在一个实施例中,脚本库中的各个脚本携带有该脚本的脚本描述信息,用于记载该脚本的能够实现的功能以及详细的监控指标,以便用户准确选择合适的脚本进行监控。In one embodiment, each script in the script library carries the script description information of the script, which is used to record the achievable functions of the script and detailed monitoring indicators, so that the user can accurately select an appropriate script for monitoring.
在一个实施例中,脚本库中的各个脚本还携带有该脚本的分类标签,分类标签用于表征脚本所对应的监控适用的服务。监控平台根据待监控的目标服务,通过查找与该目标服务对应的分类标签,然后遍历脚本库,筛选出与目标服务对应的初始脚本。需要说明的是,与目标服务对应的初始脚本的数量可以是一个,可以是两个或两个以上,监控平台在查找到初始脚本之后,将初始脚本推送至脚本配置界面。脚本配置界面是指用于辅助用户进行脚本选择或是进行脚本编辑的界面。In one embodiment, each script in the script library also carries a classification label of the script, and the classification label is used to represent the monitoring applicable service corresponding to the script. According to the target service to be monitored, the monitoring platform searches for the classification label corresponding to the target service, and then traverses the script library to filter out the initial script corresponding to the target service. It should be noted that the number of initial scripts corresponding to the target service may be one, or two or more. After finding the initial scripts, the monitoring platform pushes the initial scripts to the script configuration interface. The script configuration interface refers to an interface used to assist the user to select or edit scripts.
步骤206,响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本。
脚本选定操作可以是用户通过脚本配置界面中的展示的初始脚本,直接选中其中一个脚本以作为目标脚本的操作,也可以是用户选择其中的一个与其期望的监控内容相似度较高的脚本,通过对该脚本进行编辑得到的更新脚本并上传以作为目标脚本的操作,还可以是用户预先编辑好并存储在本地的自定义脚本。The script selection operation can be the initial script displayed by the user through the script configuration interface, and one of the scripts is directly selected as the target script operation, or the user selects one of the scripts that is highly similar to the desired monitoring content. The operation of uploading the update script obtained by editing the script as the target script may also be a custom script pre-edited by the user and stored locally.
在一个实施例中,用户在脚本配置界面选中展示的初始脚本进行选择之后,可以通过点击该界面中的确定按钮,发送携带有该脚本标识的脚本确认信息至监控平台的后台,以使监控平台通过该脚本标识确定选中的目标脚本。还可以通过点击该界面中的编辑按钮,从脚本库中调用该脚本,并通过可编辑模式展示该脚本,用户可以直接对该脚本进行编辑,并在编辑完成后上传更新的脚本并点击界面中的确认按钮,以表征完成了对脚本的选定,监控平台的后台接收到该确脚本确定信息后,将上传的脚本作为目标脚本。脚本配置界面还可以提供脚本选择窗口,用户通过脚本选择窗口可以访问本地文件,将本地文件中预先编写好的脚本上传至监控平台,实现对目标脚本的选定。In one embodiment, after the user selects the displayed initial script on the script configuration interface, the user can click the OK button in the interface to send the script confirmation information carrying the script identifier to the background of the monitoring platform, so that the monitoring platform can The selected target script is determined by the script ID. You can also call the script from the script library by clicking the edit button in the interface, and display the script in editable mode. Users can edit the script directly, upload the updated script after editing, and click on the interface. to indicate that the selection of the script is completed. After receiving the confirmation information of the script, the background of the monitoring platform takes the uploaded script as the target script. The script configuration interface can also provide a script selection window. Users can access local files through the script selection window, upload the pre-written scripts in the local files to the monitoring platform, and realize the selection of target scripts.
步骤208,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。Step 208: Generate a monitoring task according to the monitoring time and the target script, and send the monitoring task to the server corresponding to the target service for service performance monitoring.
监控任务是用于发送至服务器进行服务性能监控的任务数据,监控任务包括监控脚本和监控时间,以使服务器在指定的监控时间内运行监控脚本,实现对服务性能的准确监控。Monitoring tasks are task data sent to the server for service performance monitoring. The monitoring tasks include monitoring scripts and monitoring time, so that the server runs the monitoring scripts within the specified monitoring time to accurately monitor service performance.
监控平台通过将监控任务发送至目标服务对应的服务器,能够基于监控平台与服务器的交互,实现服务性能的监控,无需通过登录服务器来进行服务性能监控,简化了监控流程。By sending the monitoring task to the server corresponding to the target service, the monitoring platform can monitor the service performance based on the interaction between the monitoring platform and the server. There is no need to log in to the server to monitor the service performance, which simplifies the monitoring process.
上述服务性能监控方法,通过响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面,通过脚本配置界面推送初始脚本,能够便于用户选择脚本或在原有的基础上对脚本进行编辑,简化了目标脚本的获得过程,响应脚本选定操作,确定目标脚本,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控,能够实现根据不同的服务选择不同的脚本,无需登录各个服务器即可自动监控服务性能,提高监控效率。The above service performance monitoring method determines the target service to be monitored and the monitoring time for the target service by responding to the service performance monitoring configuration operation, searches for the initial script corresponding to the target service from the script library, and pushes the initial script to the script configuration interface , Push the initial script through the script configuration interface, which can facilitate the user to select the script or edit the script on the original basis, simplify the acquisition process of the target script, respond to the script selection operation, determine the target script, according to the monitoring time and the target script, Generate monitoring tasks, and send the monitoring tasks to the server corresponding to the target service for service performance monitoring. It can select different scripts according to different services, and automatically monitor service performance without logging in to each server, improving monitoring efficiency.
在其中一个实施例中,如图3所示,响应脚本选定操作,确定目标脚本包括步骤302至步骤308。In one embodiment, as shown in FIG. 3 , in response to the script selection operation, determining the target script includes
步骤302,响应脚本选定操作,得到脚本选定操作对应的提交数据;
步骤304,对提交数据进行解析,确定提交数据的脚本数据类型;
步骤306,若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本;Step 306, if the script data type is a script file, the update script edited and uploaded based on the initial script or the custom script uploaded locally is used as the target script;
步骤308,若脚本数据类型为脚本标识,则将脚本标识对应的初始脚本确定为目标脚本。Step 308: If the script data type is a script identifier, determine the initial script corresponding to the script identifier as the target script.
监控平台响应用户的脚本选定操作,得到脚本选定操作的同时提交的数据,通过对提交数据进行数据类型解析,确定提交数据携带的是脚本文件还是初始脚本标识,若是脚本文件,则将上传的脚本作为目标脚本,若是脚本标识,则将脚本标识对应的初始脚本作为目标脚本。其中,上传的脚本可能是用户基于初始脚本进行编辑并上传的更新脚本,也可能是从本地上传的自定义脚本。The monitoring platform responds to the user's script selection operation, and obtains the data submitted at the same time as the script selection operation. By analyzing the data type of the submitted data, it is determined whether the submitted data carries a script file or an initial script identifier. If it is a script file, it will be uploaded. The script is used as the target script. If it is a script ID, the initial script corresponding to the script ID is used as the target script. The uploaded script may be an update script edited and uploaded by the user based on the initial script, or may be a custom script uploaded locally.
在一个实施例中,可以先检测是否上传脚本文件,若是,则将上传的脚本文件作为目标脚本。若否,则提取提交数据携带的脚本标识,根据脚本标识确定目标脚本。在另一个实施例中,也可以先检测提交数据是否携带有脚本标识,若是,则可以直接确定脚本标识对应的初始脚本为目标脚本,若否,则检测是否上传脚本文件,若既没有脚本标识也没有脚本文件,则跳转至脚本配置界面,提示用户重新进行脚本选择。In one embodiment, it may be detected whether the script file is uploaded first, and if so, the uploaded script file is used as the target script. If not, extract the script identifier carried in the submitted data, and determine the target script according to the script identifier. In another embodiment, it is also possible to first detect whether the submitted data carries a script identifier. If so, it can directly determine that the initial script corresponding to the script identifier is the target script. If not, it is detected whether to upload a script file. If there is neither a script identifier. If there is no script file, it jumps to the script configuration interface and prompts the user to select the script again.
通过提供多种脚本配置方式,能够满足不同情境下的脚本快速配置,此外,通过提供出初始脚本进行编辑以得到更新脚本的方式,能够便于用户直接迅速地得到需要的监控脚本,一方面有助于实现对目标服务的有效准确监控,另一方面简化了脚本的编写内容,缩短了脚本编写所需要的时间。By providing a variety of script configuration methods, the script can be quickly configured in different situations. In addition, by providing the initial script for editing to obtain the updated script, it is convenient for the user to directly and quickly obtain the required monitoring script. On the one hand, it is helpful to In order to achieve effective and accurate monitoring of the target service, on the other hand, it simplifies the content of script writing and shortens the time required for script writing.
在其中一个实施例中,如图4所示,若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本之后,还包括步骤402至步骤406。In one embodiment, as shown in FIG. 4 , if the script data type is a script file, after the update script edited and uploaded based on the initial script or the custom script uploaded from the local area is used as the target script,
步骤402,提取脚本文件对应的分类标签和脚本描述信息。Step 402: Extract the classification label and script description information corresponding to the script file.
步骤404,根据分类标签和脚本描述信息,确定脚本文件对应的类别。Step 404: Determine the category corresponding to the script file according to the category label and the script description information.
步骤406,根据类别,将脚本文件添加至脚本库。
分类标签是指用于表征脚本所对应的监控适用的服务的标签,脚本描述信息是指该脚本的能够实现的功能以及详细的监控指标。根据分类标签和脚本描述信息,确定脚本文件对应的类别,即脚本文件对应的服务。脚本库中的各个脚本是按照其对应的服务进行存储的,例如将同一服务对应类别的脚本放在预先划分好的存储空间,通过按类别对脚本进行存储,能够实现对脚本的快速查找,提高监控平台的响应速度。The classification label refers to the label used to characterize the monitoring applicable service corresponding to the script, and the script description information refers to the function that the script can implement and the detailed monitoring indicators. According to the classification label and the script description information, the category corresponding to the script file is determined, that is, the service corresponding to the script file. Each script in the script library is stored according to its corresponding service. For example, the scripts corresponding to the same service category are placed in the pre-divided storage space. By storing the scripts by category, the script can be quickly searched and improved. Monitor the response speed of the platform.
通过将用户上传的脚本文件存储至脚本库,能够实现对脚本库文件的扩充,能够便于在后续的服务性能监控中直接查找得到适用的脚本,缩短了脚本编写所需要的时间。By storing the script file uploaded by the user in the script library, the expansion of the script library file can be realized, and the applicable script can be directly found in the subsequent service performance monitoring, which shortens the time required for script writing.
在一个实施例中,如图5所示,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控之后,还包括步骤502至步骤504。In one embodiment, as shown in FIG. 5 , after generating the monitoring task according to the monitoring time and the target script, and sending the monitoring task to the server corresponding to the target service for service performance monitoring, steps 502 to 504 are further included.
步骤502,接收服务器执行目标脚本后反馈的执行结果。Step 502: Receive the execution result fed back after the server executes the target script.
步骤504,在预设的监控结果展示界面展示执行结果。
服务器在接收到监控任务之后,会根据监控时间执行监控脚本,以通过脚本的执行来得到对服务器中的目标服务进行监控的监控结果,服务器在得到目标脚本执行后的监控结果之后,会根据监控任务的发送终即监控平台的标识,将监控结果反馈至监控平台,从而监控平台能够接受服务器执行目标脚本后得到并反馈的执行结果,执行结果中的内容与脚本中定义的各项指标对应。监控平台根据接收的执行结果进行展示,其中展示的执行结果可以是服务器反馈的原始数据,也可以是有监控平台对反馈的原始数据进行整理归类后的数据。After the server receives the monitoring task, it will execute the monitoring script according to the monitoring time, so as to obtain the monitoring result of monitoring the target service in the server through the execution of the script. After the task is sent, it is the identification of the monitoring platform, and the monitoring results are fed back to the monitoring platform, so that the monitoring platform can accept the execution results obtained and fed back after the server executes the target script. The content of the execution results corresponds to the indicators defined in the script. The monitoring platform displays according to the received execution results, where the displayed execution results may be the raw data fed back by the server, or the data after the raw data fed back is sorted and classified by the monitoring platform.
执行结果可以在预设的监控结果展示界面进行展示,具体来说,可以在用户通过界面触发操作进入预设的监控结果展示界面时进行执行结果展示,也可以在得到执行结果时通过主动推送监控结果展示界面至当前界面进行执行结果展示。The execution result can be displayed on the preset monitoring result display interface. Specifically, the execution result can be displayed when the user enters the preset monitoring result display interface through the interface trigger operation, or it can be monitored by active push when the execution result is obtained. The result display interface goes to the current interface to display the execution results.
在其中一个实施例中,接收服务器执行目标脚本后反馈的执行结果之后,还包括:按监控任务对应的目标服务,对执行结果进行存储。In one embodiment, after receiving the execution result fed back after the server executes the target script, the method further includes: storing the execution result according to the target service corresponding to the monitoring task.
通过按目标服务所属的类型,对执行结果进行存储,能够基于各个服务的历史监控结果,确定各个服务的性能变化情况,实现对服务的历史性能变化的监控。By storing the execution results according to the type of the target service, the performance change of each service can be determined based on the historical monitoring results of each service, and the historical performance change of the service can be monitored.
在一个实施例中,目标服务至少包括NGINX、应用层、网关、缓存、微服务、消息队列、数据库中的一个。In one embodiment, the target service includes at least one of NGINX, an application layer, a gateway, a cache, a microservice, a message queue, and a database.
NGINX、应用层、网关、缓存、微服务、消息队列、数据库用于实现不同的功能,可以部署在不同的服务器上。如图6所示,对NGINX的监控包括对负载平衡或静态资源的监控,对应用层的监控包括对tomcat或jetty的监控,对缓存的监控包括对redis(RemoteDictionary Server,远程字典服务)的监控,对数据库的监控包括mysql(关系型数据库管理系统)、oracle、sqlserver(Structured Query Language server,关系数据库管理系统)的监控,对消息队列的监控包括rocketMQ、activeMQ、rabbitMQ以及kafka的监控。在实施例中,监控平台提供常用服务的脚本可供选择,例如mysql、oracle、kafka、微服务、应用服务、redis等,便于快速得到适用的脚本。NGINX, application layer, gateway, cache, microservice, message queue, database are used to implement different functions and can be deployed on different servers. As shown in Figure 6, monitoring of NGINX includes monitoring of load balancing or static resources, monitoring of application layer includes monitoring of tomcat or jetty, monitoring of cache includes monitoring of redis (RemoteDictionary Server, remote dictionary service) , The monitoring of the database includes monitoring of mysql (relational database management system), oracle, sqlserver (Structured Query Language server, relational database management system), and the monitoring of message queues includes monitoring of rocketMQ, activeMQ, rabbitMQ and kafka. In the embodiment, the monitoring platform provides scripts for common services for selection, such as mysql, oracle, kafka, microservices, application services, redis, etc., so as to quickly obtain suitable scripts.
其中,不同的服务由于性能监控关注点不同,需要监控的性能指标都有所不同。比如mysql的监控除了CPU与内存之外,还需要监控监控期间sql的执行效率(show FULLPROCESSLIST;)、缓存命中率(key_reads/key_read_requests)等数据。应用服务(JAVA实现)除了CPU与内存之外,还需监控JVM(Java Virtual Machine,Java虚拟机)的使用情况,如GC(Global Catalog,全局目录)情况,高消耗进程的堆栈信息等。Among them, different services have different performance indicators that need to be monitored due to different performance monitoring concerns. For example, in addition to CPU and memory, mysql monitoring also needs to monitor the execution efficiency of sql during monitoring (show FULLPROCESSLIST;), cache hit rate (key_reads/key_read_requests) and other data. In addition to CPU and memory, the application service (JAVA implementation) also needs to monitor the usage of the JVM (Java Virtual Machine, Java Virtual Machine), such as GC (Global Catalog, global catalog), stack information of high-consumption processes, etc.
在其中一个实施例中,监控时间包括监控起止时间;将监控任务发送至目标服务对应的服务器进行服务性能监控包括:将监控任务发送至目标服务对应的服务器,以使服务器根据监控起止时间执行监控任务中的目标脚本进行服务性能监控。In one embodiment, the monitoring time includes the monitoring start and end time; sending the monitoring task to the server corresponding to the target service for service performance monitoring includes: sending the monitoring task to the server corresponding to the target service, so that the server performs monitoring according to the monitoring start and end time The target script in the task performs service performance monitoring.
监控平台提供监控时间选择功能,可选择监控的时间段,以实现监控期间进行监控,非监控期间可不进行监控,避免消耗服务器资源。The monitoring platform provides the monitoring time selection function, and the monitoring time period can be selected to realize the monitoring during the monitoring period, and it can not be monitored during the non-monitoring period to avoid consuming server resources.
应该理解的是,虽然上述各流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述各流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the above flow charts are displayed in sequence according to the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
在一个实施例中,如图7所示,提供了一种服务性能监控装置,包括:配置操作响应模块702、脚本推送模块704、脚本确定模块706和性能监控模块708,其中:In one embodiment, as shown in FIG. 7, a service performance monitoring apparatus is provided, including: a configuration
配置操作响应模块702,用于响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间。The configuration
脚本推送模块704,用于从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面。The
脚本确定模块706,用于响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本。The
性能监控模块708,用于根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。The
在其中一个实施例中,脚本确定模块还用于响应脚本选定操作,得到脚本选定操作对应的提交数据;对提交数据进行解析,确定提交数据的脚本数据类型;若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本;若脚本数据类型为脚本标识,则将脚本标识对应的初始脚本确定为目标脚本。In one embodiment, the script determination module is further configured to respond to the script selection operation to obtain the submission data corresponding to the script selection operation; analyze the submitted data to determine the script data type of the submitted data; if the script data type is a script file , the update script edited and uploaded based on the initial script or the custom script uploaded locally is used as the target script; if the script data type is a script ID, the initial script corresponding to the script ID is determined as the target script.
在其中一个实施例中,脚本确定模块还用于提取脚本文件对应的分类标签和脚本描述信息;根据分类标签和脚本描述信息,确定脚本文件对应的类别;根据类别,将脚本文件添加至脚本库。In one embodiment, the script determination module is further configured to extract the classification label and script description information corresponding to the script file; determine the category corresponding to the script file according to the classification label and the script description information; add the script file to the script library according to the category .
在其中一个实施例中,服务性能监控装置还包括结果展示模块,结果展示模块用于接收服务器执行目标脚本后反馈的执行结果;在预设的监控结果展示界面展示执行结果。In one embodiment, the service performance monitoring apparatus further includes a result display module, and the result display module is configured to receive the execution result fed back after the server executes the target script; and display the execution result on a preset monitoring result display interface.
在其中一个实施例中,服务性能监控装置还包括结果存储模块,结果存储模块用于按监控任务对应的目标服务,对执行结果进行存储。In one embodiment, the service performance monitoring apparatus further includes a result storage module, and the result storage module is configured to store the execution result according to the target service corresponding to the monitoring task.
在其中一个实施例中,目标服务至少包括NGINX、应用层、网关、缓存、微服务、消息队列、数据库中的一个。In one of the embodiments, the target service includes at least one of NGINX, an application layer, a gateway, a cache, a microservice, a message queue, and a database.
在其中一个实施例中,监控时间包括监控起止时间;性能监控模块还用于将监控任务发送至目标服务对应的服务器,以使服务器根据监控起止时间执行监控任务中的目标脚本进行服务性能监控。In one embodiment, the monitoring time includes monitoring start and end time; the performance monitoring module is further configured to send the monitoring task to the server corresponding to the target service, so that the server executes the target script in the monitoring task according to the monitoring start and end time to monitor service performance.
上述服务性能监控装置,通过响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面,通过脚本配置界面推送初始脚本,能够便于用户选择脚本或在原有的基础上对脚本进行编辑,简化了目标脚本的获得过程,响应脚本选定操作,确定目标脚本,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控,能够实现根据不同的服务选择不同的脚本,无需登录各个服务器即可自动监控服务性能,提高监控效率。The above-mentioned service performance monitoring device determines the target service to be monitored and the monitoring time for the target service by responding to the service performance monitoring configuration operation, searches the initial script corresponding to the target service from the script library, and pushes the initial script to the script configuration interface , Push the initial script through the script configuration interface, which can facilitate the user to select the script or edit the script on the original basis, simplify the acquisition process of the target script, respond to the script selection operation, determine the target script, according to the monitoring time and the target script, Generate monitoring tasks, and send the monitoring tasks to the server corresponding to the target service for service performance monitoring. It can select different scripts according to different services, and automatically monitor service performance without logging in to each server, improving monitoring efficiency.
关于服务性能监控装置的具体限定可以参见上文中对于服务性能监控方法的限定,在此不再赘述。上述服务性能监控装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For specific limitations on the service performance monitoring apparatus, reference may be made to the above limitations on the service performance monitoring method, which will not be repeated here. Each module in the above-mentioned service performance monitoring device may be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种服务性能监控方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 8 . The computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies. The computer program, when executed by the processor, implements a service performance monitoring method. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program:
响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。Respond to the service performance monitoring configuration operation, determine the target service to be monitored and the monitoring time for the target service; find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface; respond to the script selection operation, Determine the target script, the target script is the initial script or the update script edited and uploaded based on the initial script, or the custom script uploaded from the local; According to the monitoring time and the target script, the monitoring task is generated, and the monitoring task is sent to the corresponding target service. The server performs service performance monitoring.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
响应脚本选定操作,得到脚本选定操作对应的提交数据;对提交数据进行解析,确定提交数据的脚本数据类型;若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本;若脚本数据类型为脚本标识,则将脚本标识对应的初始脚本确定为目标脚本。In response to the script selection operation, the submitted data corresponding to the script selection operation is obtained; the submitted data is analyzed to determine the script data type of the submitted data; if the script data type is a script file, the updated script will be edited and uploaded based on the initial script Or a custom script uploaded locally as the target script; if the script data type is a script ID, the initial script corresponding to the script ID is determined as the target script.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
提取脚本文件对应的分类标签和脚本描述信息;根据分类标签和脚本描述信息,确定脚本文件对应的类别;根据类别,将脚本文件添加至脚本库。The classification label and script description information corresponding to the script file are extracted; the category corresponding to the script file is determined according to the classification label and the script description information; the script file is added to the script library according to the category.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
接收服务器执行目标脚本后反馈的执行结果;在预设的监控结果展示界面展示执行结果。Receive the execution result fed back after the server executes the target script; display the execution result on the preset monitoring result display interface.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, the processor further implements the following steps when executing the computer program:
按监控任务对应的目标服务,对执行结果进行存储。The execution result is stored according to the target service corresponding to the monitoring task.
在其中一个实施例中,目标服务至少包括NGINX、应用层、网关、缓存、微服务、消息队列、数据库中的一个。In one of the embodiments, the target service includes at least one of NGINX, an application layer, a gateway, a cache, a microservice, a message queue, and a database.
在其中一个实施例中,监控时间包括监控起止时间;处理器执行计算机程序时还实现以下步骤将监控任务发送至目标服务对应的服务器,以使服务器根据监控起止时间执行监控任务中的目标脚本进行服务性能监控。In one embodiment, the monitoring time includes the monitoring start and end time; when the processor executes the computer program, the processor also implements the following steps to send the monitoring task to the server corresponding to the target service, so that the server executes the target script in the monitoring task according to the monitoring start and end time. Service performance monitoring.
上述用于实现服务性能监控方法的计算机设备,通过响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面,通过脚本配置界面推送初始脚本,能够便于用户选择脚本或在原有的基础上对脚本进行编辑,简化了目标脚本的获得过程,响应脚本选定操作,确定目标脚本,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控,能够实现根据不同的服务选择不同的脚本,无需登录各个服务器即可自动监控服务性能,提高监控效率。The above-mentioned computer equipment for implementing the service performance monitoring method determines the target service to be monitored and the monitoring time for the target service by responding to the service performance monitoring configuration operation, searches for the initial script corresponding to the target service from the script library, and converts the initial script to the target service. The script is pushed to the script configuration interface, and the initial script is pushed through the script configuration interface, which can facilitate the user to select the script or edit the script on the original basis, simplify the acquisition process of the target script, respond to the script selection operation, and determine the target script. Monitor time and target scripts, generate monitoring tasks, and send the monitoring tasks to the server corresponding to the target service for service performance monitoring. It can select different scripts according to different services, and automatically monitor service performance without logging in to each server, improving monitoring. efficiency.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间;从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面;响应脚本选定操作,确定目标脚本,目标脚本为初始脚本或基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本;根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控。Respond to the service performance monitoring configuration operation, determine the target service to be monitored and the monitoring time of the target service; find the initial script corresponding to the target service from the script library, and push the initial script to the script configuration interface; respond to the script selection operation, Determine the target script, the target script is the initial script or the update script edited and uploaded based on the initial script, or the custom script uploaded from the local; According to the monitoring time and the target script, the monitoring task is generated, and the monitoring task is sent to the corresponding target service. The server performs service performance monitoring.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
响应脚本选定操作,得到脚本选定操作对应的提交数据;对提交数据进行解析,确定提交数据的脚本数据类型;若脚本数据类型为脚本文件,则将基于初始脚本进行编辑并上传的更新脚本或从本地上传的自定义脚本作为目标脚本;若脚本数据类型为脚本标识,则将脚本标识对应的初始脚本确定为目标脚本。In response to the script selection operation, the submitted data corresponding to the script selection operation is obtained; the submitted data is analyzed to determine the script data type of the submitted data; if the script data type is a script file, the updated script will be edited and uploaded based on the initial script Or a custom script uploaded locally as the target script; if the script data type is a script ID, the initial script corresponding to the script ID is determined as the target script.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
提取脚本文件对应的分类标签和脚本描述信息;根据分类标签和脚本描述信息,确定脚本文件对应的类别;根据类别,将脚本文件添加至脚本库。The classification label and script description information corresponding to the script file are extracted; the category corresponding to the script file is determined according to the classification label and the script description information; the script file is added to the script library according to the category.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
接收服务器执行目标脚本后反馈的执行结果;在预设的监控结果展示界面展示执行结果。Receive the execution result fed back after the server executes the target script; display the execution result on the preset monitoring result display interface.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:In one embodiment, the computer program further implements the following steps when executed by the processor:
按监控任务对应的目标服务,对执行结果进行存储。The execution result is stored according to the target service corresponding to the monitoring task.
在其中一个实施例中,目标服务至少包括NGINX、应用层、网关、缓存、微服务、消息队列、数据库中的一个。In one of the embodiments, the target service includes at least one of NGINX, an application layer, a gateway, a cache, a microservice, a message queue, and a database.
在其中一个实施例中,监控时间包括监控起止时间;计算机程序被处理器执行时还实现以下步骤将监控任务发送至目标服务对应的服务器,以使服务器根据监控起止时间执行监控任务中的目标脚本进行服务性能监控。In one embodiment, the monitoring time includes the monitoring start and end time; when the computer program is executed by the processor, the following steps are also implemented to send the monitoring task to the server corresponding to the target service, so that the server executes the target script in the monitoring task according to the monitoring start and end time Perform service performance monitoring.
上述用于实现服务性能监控方法的计算机可读存储介质,通过响应服务性能监控配置操作,确定待监控的目标服务以及对目标服务的监控时间,从脚本库中查找与目标服务对应的初始脚本,并将初始脚本推送至脚本配置界面,通过脚本配置界面推送初始脚本,能够便于用户选择脚本或在原有的基础上对脚本进行编辑,简化了目标脚本的获得过程,响应脚本选定操作,确定目标脚本,根据监控时间以及目标脚本,生成监控任务,并将监控任务发送至目标服务对应的服务器进行服务性能监控,能够实现根据不同的服务选择不同的脚本,无需登录各个服务器即可自动监控服务性能,提高监控效率。The above-mentioned computer-readable storage medium for realizing the service performance monitoring method, by responding to the service performance monitoring configuration operation, determining the target service to be monitored and the monitoring time for the target service, and searching for the initial script corresponding to the target service from the script library, Push the initial script to the script configuration interface, and push the initial script through the script configuration interface, which can facilitate the user to select the script or edit the script on the original basis, simplify the acquisition process of the target script, respond to the script selection operation, and determine the target. The script generates monitoring tasks according to the monitoring time and the target script, and sends the monitoring tasks to the server corresponding to the target service for service performance monitoring. It can select different scripts according to different services, and automatically monitor service performance without logging in to each server. , improve monitoring efficiency.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all It is considered to be the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be noted that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011551813.1ACN114676013B (en) | 2020-12-24 | 2020-12-24 | Service performance monitoring method, device, computer equipment and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011551813.1ACN114676013B (en) | 2020-12-24 | 2020-12-24 | Service performance monitoring method, device, computer equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN114676013Atrue CN114676013A (en) | 2022-06-28 |
| CN114676013B CN114676013B (en) | 2025-09-05 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202011551813.1AActiveCN114676013B (en) | 2020-12-24 | 2020-12-24 | Service performance monitoring method, device, computer equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN114676013B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20110009771A (en)* | 2009-07-23 | 2011-01-31 | 주식회사 세파테크놀로지 | Automatic monitoring system and method |
| CN107241229A (en)* | 2017-07-03 | 2017-10-10 | 北京奇安信科技有限公司 | A kind of business monitoring method and device based on interface testing instrument |
| CN110659104A (en)* | 2019-08-29 | 2020-01-07 | 重庆小雨点小额贷款有限公司 | Service monitoring method and related equipment |
| CN111045893A (en)* | 2019-12-12 | 2020-04-21 | 网银在线(北京)科技有限公司 | Method, device and system for executing monitoring task, storage medium and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20110009771A (en)* | 2009-07-23 | 2011-01-31 | 주식회사 세파테크놀로지 | Automatic monitoring system and method |
| CN107241229A (en)* | 2017-07-03 | 2017-10-10 | 北京奇安信科技有限公司 | A kind of business monitoring method and device based on interface testing instrument |
| CN110659104A (en)* | 2019-08-29 | 2020-01-07 | 重庆小雨点小额贷款有限公司 | Service monitoring method and related equipment |
| CN111045893A (en)* | 2019-12-12 | 2020-04-21 | 网银在线(北京)科技有限公司 | Method, device and system for executing monitoring task, storage medium and electronic device |
| Publication number | Publication date |
|---|---|
| CN114676013B (en) | 2025-09-05 |
| Publication | Publication Date | Title |
|---|---|---|
| US11741396B1 (en) | Efficient command execution using aggregated compute units | |
| US11636397B1 (en) | Graphical user interface for concurrent forecasting of multiple time series | |
| US11314759B2 (en) | In-memory catalog for searching metrics data | |
| US11704313B1 (en) | Parallel branch operation using intermediary nodes | |
| CN108304201B (en) | Object updating method, device and equipment | |
| US11915156B1 (en) | Identifying leading indicators for target event prediction | |
| US11995381B2 (en) | Two-tier capacity planning | |
| US20190095478A1 (en) | Information technology networked entity monitoring with automatic reliability scoring | |
| US20170220672A1 (en) | Enhancing time series prediction | |
| US8407340B2 (en) | Page load performance analysis | |
| CN111259212B (en) | Telemetering data interpretation method, device, equipment and storage medium | |
| CN111666201A (en) | Regression testing method, device, medium and electronic equipment | |
| CN111444158A (en) | Long-short term user portrait generation method, device, equipment and readable storage medium | |
| CN117785539A (en) | Log data analysis method, device, computer equipment and storage medium | |
| CN114676013A (en) | Service performance monitoring method and device, computer equipment and storage medium | |
| US12399954B2 (en) | Data lineage metric based data processing | |
| US20250244974A1 (en) | Web application telemetry | |
| CN118132656A (en) | Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium | |
| CN118409970A (en) | Application program performance test method, device, computer equipment, storage medium and computer program product | |
| CN119515314A (en) | Functional flow configuration method, device, computer equipment, readable storage medium and program product for electric power operation project | |
| CN114116291A (en) | Log detection method, log detection device, computer device and storage medium | |
| CN113220958A (en) | Page information display method, system and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |