WO2019237532A1 - 一种业务数据的监控方法、存储介质、终端设备及装置 - Google Patents

一种业务数据的监控方法、存储介质、终端设备及装置 Download PDF

Info

Publication number
WO2019237532A1
WO2019237532A1 PCT/CN2018/104973 CN2018104973W WO2019237532A1 WO 2019237532 A1 WO2019237532 A1 WO 2019237532A1 CN 2018104973 W CN2018104973 W CN 2018104973W WO 2019237532 A1 WO2019237532 A1 WO 2019237532A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
log
log file
line
data
Prior art date
Application number
PCT/CN2018/104973
Other languages
English (en)
French (fr)
Inventor
杨先博
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019237532A1 publication Critical patent/WO2019237532A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method, a storage medium, a terminal device, and a device for monitoring service data.
  • This application provides a method, a storage medium, a terminal device, and a device for monitoring service data, and aims to solve the problem that the existing monitoring products cannot completely cover all the service data that a user needs to monitor, which has a large limitation.
  • a first aspect of the embodiments of the present application provides a method for monitoring service data, including:
  • the target service data is monitored on a preset display interface.
  • a computer-readable storage medium stores computer-readable instructions.
  • the computer-readable instructions are executed by a processor, the computer-readable instructions are implemented as in the embodiments of the application.
  • the first aspect presents the steps of a method for monitoring business data.
  • a third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer When the instructions are readable, the steps of the method for monitoring service data provided by the first aspect of the embodiments of the present application are implemented.
  • a fourth aspect of the embodiments of the present application provides a device for monitoring service data, including:
  • Script acquisition module used to acquire pre-written custom scripts
  • a script writing module configured to write the custom script into a function configuration file of a data monitoring task to obtain a customized data monitoring task
  • a business data collection module configured to execute the data monitoring task, and collect target business data corresponding to the data monitoring task
  • a business data monitoring module is configured to monitor the target business data on a preset display interface.
  • This application constructs a custom data monitoring task by writing a custom script file in advance and writing the script file into a function configuration file. Then, use the data monitoring task to collect the business data that needs to be monitored, and finally, the business data can be monitored. Because the data monitoring task is user-defined, any type of business data that the user wants to monitor can be collected, thereby solving the problem that existing monitoring products cannot completely cover all the business data that the user needs to monitor.
  • FIG. 1 is a flowchart of a first embodiment of a method for monitoring service data according to an embodiment of the present application
  • FIG. 2a is a flowchart of a second embodiment of a method for monitoring service data according to an embodiment of the present application
  • FIG. 2b is a flowchart of an embodiment of step 205 in FIG. 2a;
  • FIG. 3 is a structural diagram of an embodiment of a device for monitoring service data according to an embodiment of the present application.
  • This application provides a method, a storage medium, a terminal device, and a device for monitoring service data, and aims to solve the problem that the existing monitoring products cannot completely cover all the service data that a user needs to monitor, which has a large limitation.
  • a first embodiment of a method for monitoring service data in an embodiment of the present application includes:
  • This custom script file is pre-written by the user to customize configurable data monitoring tasks.
  • the custom script is written into the function configuration file of the data monitoring task according to certain rules, so that the functions of the data monitoring task can be customized, including the type of data collected, the time of collecting data, etc., and finally You can get user-defined data monitoring tasks.
  • the data monitoring task is executed, and target business data corresponding to the data monitoring task is collected, that is, user-defined service data to be monitored is collected.
  • these business data may include data such as application performance, application log analysis, process performance, database performance, operational data in the database, middleware performance, and network device performance.
  • step 103 may include:
  • a pre-designed deployment package can be embedded in the middleware of the terminal system. For example, if you want to collect performance data of java middleware tomcat and weblogic, you can design two war deployment packages, which are embedded into the middleware tomcat and weblogic respectively, to achieve the acquisition of middleware performance data.
  • the target service data is monitored through a preset display interface.
  • a data monitoring tool with a visual operation interface can be designed, and the collected target business data is displayed on the interface of the data monitoring tool.
  • the method for monitoring business data includes: obtaining a custom script that is written in advance; writing the custom script into a function configuration file of a data monitoring task to obtain a customized data monitoring task; and performing the data monitoring Task, collecting target business data corresponding to the data monitoring task; monitoring the target business data on a preset display interface.
  • This application constructs a custom data monitoring task by writing a custom script file in advance and writing the script file into a function configuration file. Then, use the data monitoring task to collect the business data that needs to be monitored, and finally, the business data can be monitored. Because the data monitoring task is user-defined, any type of business data that the user wants to monitor can be collected, thereby solving the problem that existing monitoring products cannot completely cover all the business data that the user needs to monitor.
  • a second embodiment of a method for monitoring service data in an embodiment of the present application includes:
  • Steps 201-203 are the same as steps 101-103. For details, refer to the description of steps 101-103.
  • the business data that the user needs to monitor may be hidden in the contents of the log file.
  • a log comparison table may be constructed in advance, and the log comparison table records the correspondence between the log file and the business data, that is, in which log file a certain business data may be located.
  • the target log file associated with the target business data that needs to be monitored can be queried from the log comparison table. For example, if the business data that the user wants to monitor is the access volume of a certain business system, the log file associated with the access volume obtained by querying the log comparison table is the access log of the business system, so the access log can be used as The target log file is described.
  • preset target data extraction logic may be used to extract the target service data from the target log file.
  • step 205 may include:
  • step 2052 Determining whether the target log file is a single-line log file, where the single-line log file refers to a log file in which each log record is a single line. If the target log file is a single-line log file, step 2052 is performed; if the target log file is not a single-line log file, step 2053 is performed.
  • the target log file is a single-line log file, and it is relatively easy to extract the required business data from the single-line log records. Specifically, the target log file can be extracted from the target log file by using column division and regular expression extraction. The target service data.
  • the two single-line log records of the target log file are as follows (the following log records (1) and (2) are actually single-line log records in the target log file, and this article shows two lines due to limited pages):
  • the target log file is not a single-line log file. At this time, target business data cannot be extracted directly from the target log file by means of column segmentation and regular expression extraction. However, you can take a certain approach to process the target log file, convert it to a single-line log file, and then extract business data.
  • step 2053 may include:
  • the target log file is not a single-line log file, that is, one or more log records containing multiple lines of log content exist in the log file. These log records are searched from the target log file as the target log records to be processed. For each target log record, combine multiple lines of log content containing a specific string in the log record into a single line of log content, and then delete each line of log content that does not contain the specific string in the log record, thereby removing each target log The records are converted into a single-line log record, that is, the target log file is converted into a single-line log file.
  • the specific character string may be an arbitrary character string determined according to the business data and the content of the target log file. Combining multiple lines of log content containing the specific character string into one line of log content can realize the arrangement of log content containing business data information to the same Line log content.
  • the step of combining a plurality of lines of log content including a specific character string in the target log record into a line of log content may include:
  • the original log content of a target log record is as follows:
  • steps B1-B2 can also be used to merge the line content.
  • duplicate content in multiple lines of log content can be removed.
  • the original log content of a target log record is as follows:
  • the combined log content can be:
  • LBM L0303020
  • NodeId 10
  • MsgId 000001010469B0A41D4B39FF
  • Len 386
  • QueueId 101
  • steps A1-A2 and the manners in steps B1-B2 may be used alone or in a stack.
  • the multi-line log content containing a specific character string in the target log record may further include:
  • a content replacer is set, and a user can replace certain keywords or characters in a certain line with keywords or characters that he wants.
  • the original log content is:
  • a total time _2208ms A time to read xml_19ms A time to load data_633 ms A time to generate pdf_382ms A time to call CA signature _1174ms
  • the method may further include:
  • (1) Define a row filter and a column filter, the row filter contains the row number of the log content to be filtered, and the column filter contains the column number of the log content to be filtered;
  • setting a content filter allows users to keep the analysis of the rows or columns they want (whitelist) and discard the rows or columns they don't want (blacklist). With this setting, some log records that cannot provide business data can be filtered to improve the extraction efficiency of business data.
  • Step 206 is the same as step 104.
  • Step 206 For details, refer to the related description of step 104.
  • the method for monitoring business data includes: obtaining a custom script that is written in advance; writing the custom script into a function configuration file of a data monitoring task to obtain a customized data monitoring task; and performing the data monitoring Tasks: querying a preset log comparison table to obtain a target log file associated with the target business data; extracting the target business data from the target log file; monitoring the target business data on a preset display interface .
  • the service data to be monitored in this embodiment is in a log file, and a preset processing method is required to extract the service data from the log file for monitoring.
  • the above mainly describes a method for monitoring business data, and a device for monitoring business data will be described in detail below.
  • an embodiment of a device for monitoring service data in an embodiment of the present application includes:
  • a script acquisition module 301 configured to acquire a pre-written custom script
  • a script writing module 302 configured to write the custom script into a function configuration file of a data monitoring task to obtain a customized data monitoring task;
  • a business data collection module 303 configured to execute the data monitoring task, and collect target business data corresponding to the data monitoring task;
  • a business data monitoring module 304 is configured to monitor the target business data on a preset display interface.
  • the service data collection module may include:
  • a log query unit configured to query a preset log comparison table to obtain a target log file associated with the target service data
  • a service data extraction unit is configured to extract the target service data from the target log file.
  • the service data extraction unit may include:
  • a single-line log determination subunit configured to determine whether the target log file is a single-line log file, where the single-line log file refers to a log file in which each log record is a line;
  • a data extraction subunit configured to extract the target service data from the target log file by using column division and regular expression extraction if the target log file is a single-line log file;
  • the log conversion subunit is configured to convert the target log file into a single-line log file if the target log file is not a single-line log file.
  • log conversion subunit may include:
  • a log record search sun unit configured to search a target log record containing multiple lines of log content from the target log file
  • the log content merging unit is configured to merge multiple lines of log content containing a specific character string in the target log record into one line of log content, and then delete the log content of each line that does not include the specific character string in the target log record .
  • the merged sun unit of the log content may include:
  • a first search sun unit configured to search a first character string and a second character string in the target log record
  • the first line merges the grandchild unit, and uses the first character string as a line start position and the second character string as a line end position, the first character string, the second character string, the Merge the log content between the first character string and the second character string into one line of log content;
  • a second search grandson unit configured to search the target log record for a multi-line log content including a third character string
  • the second line merges the sun units, and is used to merge the multiple lines of log content into one line of log content.
  • log conversion subunit may further include:
  • a third search sun unit configured to search a fourth character string in the target log record
  • a character string replacement sun unit configured to replace the fourth character string with a preset fifth character string.
  • log conversion subunit may further include:
  • a filter definition sun unit is used to define a row filter and a column filter, the row filter contains a row number of a log content to be filtered, and the column filter contains a column number of a log content to be filtered;
  • the log filtering grand unit is configured to filter the log content corresponding to the row number and the log content corresponding to the column number in the target log file.
  • the service data collection module may include:
  • a deployment package embedding unit for embedding a preset deployment package into a specific middleware of a terminal system
  • a performance data collection unit is configured to use the deployment package to collect performance data of the specific middleware.
  • An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, any one shown in FIG. 1 or FIG. 2a is implemented. Steps of a business data monitoring method.
  • An embodiment of the present application further provides a terminal device including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor.
  • the processor executes the computer-readable instructions, Steps of implementing a method for monitoring any kind of business data as shown in FIG. 1 or FIG. 2a.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请涉及通信技术领域,提出一种业务数据的监控方法、存储介质、终端设备及装置。该方法包括:获取预先编写的自定义脚本;将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;在预设的显示界面对所述目标业务数据进行监控。本申请通过将自定义的脚本文件写入功能配置文件,构建出自定义的数据监控任务。然后,利用该数据监控任务采集需要监控的业务数据,最后即可对该业务数据进行监控。由于所述数据监控任务是用户自定义的,故能够采集到用户想要监控的任意类型的业务数据,从而解决了现有的监控产品无法完全覆盖用户需要监控的所有业务数据的问题。

Description

一种业务数据的监控方法、存储介质、终端设备及装置
本申请要求于2018年6月14日提交中国专利局、申请号为201810613809.X、申请名称为“一种业务数据的监控方法、存储介质和服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种业务数据的监控方法、存储介质、终端设备及装置。
背景技术
在银行、信贷等业务系统中,经常需要对各类业务数据进行监控,比如应用性能,应用日志分析,进程性能,数据库性能,数据库内的运营数据,中间件性能,网络设备性能等数据。目前,一般采用zabbix、open-falcon等开源监控产品监控业务数据,然而,这些监控产品能够监控的数据类型比较有限,无法完全覆盖用户需要监控的所有业务数据,局限性较大。
技术问题
本申请提供了一种业务数据的监控方法、存储介质、终端设备及装置,旨在解决现有的监控产品无法完全覆盖用户需要监控的所有业务数据,局限性较大的问题。
技术解决方案
本申请实施例的第一方面,提供了一种业务数据的监控方法,包括:
获取预先编写的自定义脚本;
将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
在预设的显示界面对所述目标业务数据进行监控。
本申请实施例的第二方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如本申请实施例的第一方面提出的业务数据的监控方法的步骤。
本申请实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如本申请实施例的第一方面提出的业务数据的监控方法的步骤。
本申请实施例的第四方面提供了一种业务数据的监控装置,包括:
脚本获取模块,用于获取预先编写的自定义脚本;
脚本写入模块,用于将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
业务数据采集模块,用于执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
业务数据监控模块,用于在预设的显示界面对所述目标业务数据进行监控。
有益效果
本申请通过预先编写自定义的脚本文件,将该脚本文件写入功能配置文件,构建出自定义的数据监控任务。然后,利用该数据监控任务采集需要监控的业务数据,最后即可对该业务数据进行监控。由于所述数据监控任务是用户自定义的,故能够采集到用户想要监控的任意类型的业务数据,从而解决了现有的监控产品无法完全覆盖用户需要监控的所有业务数据的问题。
附图说明
图1是本申请实施例提供的一种业务数据的监控方法的第一个实施例的流程图;
图2a是本申请实施例提供的一种业务数据的监控方法的第二个实施例的流程图;
图2b是图2a中步骤205的一个实施例的流程图;
图3是本申请实施例提供的一种业务数据的监控装置的一个实施例的结构图。
本发明的实施方式
本申请提供了一种业务数据的监控方法、存储介质、终端设备及装置,旨在解决现有的监控产品无法完全覆盖用户需要监控的所有业务数据,局限性较大的问题。
请参阅图1,本申请实施例中一种业务数据的监控方法的第一个实施例包括:
101、获取预先编写的自定义脚本;
该自定义脚本文件是用户预先编写好的,用于定制可配置的数据监控任务。
102、将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
在定制数据监控任务时,按照一定的规则将所述自定义脚本写入数据监控任务的功能配置文件,从而可以定制该数据监控任务的功能,包括采集的数据类型、采集数据的时间等,最终可以得到用户自定义的数据监控任务。
103、执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
在定制数据监控任务之后,执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据,也即采集用户自定义的需要监控的业务数据。具体的,这些业务数据可以包括:应用性能,应用日志分析,进程性能,数据库性能,数据库内的运营数据,中间件性能,网络设备性能等数据。在采集数据时,可以利用snmp,http,ssh,telnet等方式采集存储在本地或远程服务器中的业务数据。
进一步的,步骤103可以包括:
(1)将预设的部署包嵌入终端系统的中间件;
(2)利用所述部署包采集所述中间件的性能数据。
为了采集某些中间件的性能数据,可以将预先设计的部署包嵌入到终端系统的中间件中。比如,若想采集java中间件tomcat和weblogic的性能数据,可以设计两个war部署包,分别内嵌到中间件tomcat和weblogic中,以实现中间件性能数据的获取。
104、在预设的显示界面对所述目标业务数据进行监控。
在采集到目标业务数据之后,通过预设的显示界面对所述目标业务数据进行监控。在实际操作中,可以设计一个具有可视化操作界面的数据监控工具,在该数据监控工具的界面上展示采集到的目标业务数据。
本申请实施例提出的业务数据的监控方法包括:获取预先编写的自定义脚本;将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;在预设的显示界面对所述目标业务数据进行监控。本申请通过预先编写自定义的脚本文件,将该脚本文件写入功能配置文件,构建出自定义的数据监控任务。然后,利用该数据监控任务采集需要监控的业务数据,最后即可对该业务数据进行监控。由于所述数据监控任务是用户自定义的,故能够采集到用户想要监控的任意类型的业务数据,从而解决了现有的监控产品无法完全覆盖用户需要监控的所有业务数据的问题。
请参阅图2a,本申请实施例中一种业务数据的监控方法的第二个实施例包括:
201、获取预先编写的自定义脚本;
202、将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
203、执行所述数据监控任务;
步骤201-203与步骤101-103相同,具体可参照步骤101-103的相关说明。
204、在预设的日志对照表中查询得到与目标业务数据关联的目标日志文件;
在某些情况下,用户需要监控的业务数据可能藏于日志文件的内容中。此时,可以预先构建一个日志对照表,该日志对照表记录着日志文件和业务数据之间的对应关系,即某个业务数据可能处于哪个日志文件中。然后,即可从该日志对照表中查询得到与需要监控的目标业务数据关联的目标日志文件。比如,若用户想要监控的业务数据是某个业务系统的访问量,从日志对照表中查询得到与该访问量关联的日志文件是该业务系统的访问日志,故可将该访问日志作为所述目标日志文件。
205、从所述目标日志文件中提取所述目标业务数据;
在确定目标日志文件之后,可以采用预设的数据提取逻辑从所述目标日志文件中提取出所述目标业务数据。
进一步的,如图2b所示,步骤205可以包括:
2051、判断所述目标日志文件是否为单行的日志文件;
判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件。若所述目标日志文件为单行的日志文件,则执行步骤2052;若所述目标日志文件不是单行的日志文件,则执行步骤2053。
2052、采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
所述目标日志文件是单行的日志文件,在从单行的日志记录中提取出需要的业务数据是相对容易的,具体可以采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据。
比如,目标日志文件的2条单行的日志记录如下所示(以下日志记录(1)和(2)在目标日志文件中实际上为单行的日志记录,本文因页面有限展示为两行):
(1)4.0.5.13 0.232 - [24/Jul/2017:16:38:11 +0800] "GET /agent/Some.do HTTP/1.0" 200 5101840 "-" "Wget/1.12 (linux-gnu)" "-"
(2)4.0.5.26 0.242 - [24/Jul/2017:16:41:27 +0800] "GET /agent/Some.do HTTP/1.0" 200 5101840 "-" "Wget/1.12 (linux-gnu)" "-"
这是一个常见的nginx日志,访问的URL为/agent/Some.do。结合已知的日志格式,采用列切割、列定义和正则表达式提取的方式对该日志记录中的内容进行处理,最终提取出的一部分业务数据为:平均响应时间:(0.232+0.242)/2=0.237;平均访问大小:(5101840+5101840)/2=5101840;总访问大小:5101840+5101840=10203680。
2053、将所述目标日志文件转换为单行的日志文件。
所述目标日志文件不是单行的日志文件,此时无法直接通过列分割和正则表达式提取的方式从目标日志文件中提取出目标业务数据。然而,可以采取一定的方式对目标日志文件进行处理,将其转换为单行的日志文件,然后再提取业务数据。
进一步的,步骤2053可以包括:
从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
目标日志文件不是单行的日志文件,也即该日志文件中存在包含多行日志内容的一条或多条日志记录,从目标日志文件中搜索出这些日志记录,作为待处理的目标日志记录。针对每条目标日志记录,将日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将日志记录中不含所述特定字符串的各行日志内容删除,从而将每条目标日志记录都转化为单行的日志记录,也即将所述目标日志文件转换为单行的日志文件。所述特定字符串可以是根据业务数据和目标日志文件内容确定的任意字符串,将包含特定字符串的多行日志内容合并成一行日志内容,可以实现将包含业务数据信息的日志内容布置到同一行日志内容中。
更进一步的,所述将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容可以包括:
(A1)在所述目标日志记录中搜索第一字符串和第二字符串;
(A2)以所述第一字符串为行起始位置、所述第二字符串为行结束位置,将所述第一字符串、所述第二字符串、所述第一字符串和第二字符串之间的日志内容合并成一行日志内容。
比如,某条目标日志记录的原始日志内容如下:
     QUERY_KEY(string,256,0)=
USER_ID(string,30,0)=
TOTAL_NUM(string,15,0)
以QUERY_KEY为第一字符串,TOTAL_NUM为第二字符串,则合并后的一行日志内容为:
QUERY_KEY(string,256,0)=USER_ID(string,30,0)=TOTAL_NUM
除了步骤A1-A2列出的方式,还可以采用以下步骤B1-B2的方式进行行内容的合并。
(B1)在所述目标日志记录中搜索包含第三字符串的多行日志内容;
(B2)将所述多行日志内容合并成一行日志内容。
另外,在合并时,多行日志内容中重复的内容可以去除,比如,某条目标日志记录的原始日志内容如下:
    LBM=L0303020,MsgId=000001010469B0A41D4B39FF, Len=386
20170721-151512-000101 119183 139749670373152  98  Ans: NodeId=10,MsgId=000001010469B0A41D4B39FF,QueueId=101 GV2gODkBbGg=20170721151511000058000024L030302000149000000
以MsgId为第三字符串,则合并后的一行日志内容可以为:
LBM=L0303020,NodeId=10,MsgId=000001010469B0A41D4B39FF,Len=386,QueueId=101
另外,需要说明的是,上述步骤A1-A2列出的方式以及步骤B1-B2的方式可以单独使用,也可以叠加使用。
更进一步的,在将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容之前,还可以包括:
(1)在所述目标日志记录中搜索第四字符串;
(2)将所述第四字符串替换为预设的第五字符串。
也即,设置一个内容替换器,用户可以将某一行内的某些关键词或字符替换为自己想要的关键词或字符。
比如,原始日志内容为:
A总耗时:2208ms|A读取xml耗时:19ms|A 加载数据耗时:633 ms|A 生成pdf耗时:382ms|A 调用CA签章耗时:1174ms
将字符“|”替换为空格,将字符“:”替换为“_”,最终得到的日志内容为:
A总耗时_2208ms A读取xml耗时_19ms A 加载数据耗时_633 ms A 生成pdf耗时_382ms A 调用CA签章耗时_1174ms
更进一步的,在将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容之后,还可以包括:
(1)定义行过滤器和列过滤器,所述行过滤器包含需要滤除的日志内容的行编号,所述列过滤器包含需要滤除的日志内容的列编号;
(2)将所述目标日志文件中所述行编号对应的日志内容和所述列编号对应的日志内容滤除。
也即,设置一个内容过滤器,用户可以将自己想要的行或列保留分析(白名单),不想要的行或列丢弃(黑名单)。通过这样设置,对于某些无法提供业务数据的日志记录,可以进行滤除,以提高业务数据的提取效率。
206、在预设的显示界面对所述目标业务数据进行监控。
步骤206与步骤104相同,具体可参照步骤104的相关说明。
本申请实施例提出的业务数据的监控方法包括:获取预先编写的自定义脚本;将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;执行所述数据监控任务;在预设的日志对照表中查询得到与目标业务数据关联的目标日志文件;从所述目标日志文件中提取所述目标业务数据;在预设的显示界面对所述目标业务数据进行监控。与本申请的第一个实施例相比,本实施例所要监控的业务数据处于日志文件当中,需要采用预设的处理方法从日志文件中提取出业务数据以进行监控。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上面主要描述了一种业务数据的监控方法,下面将对一种业务数据的监控装置进行详细描述。
请参阅图3,本申请实施例中一种业务数据的监控装置的一个实施例包括:
脚本获取模块301,用于获取预先编写的自定义脚本;
脚本写入模块302,用于将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
业务数据采集模块303,用于执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
业务数据监控模块304,用于在预设的显示界面对所述目标业务数据进行监控。
进一步的,所述业务数据采集模块可以包括:
日志查询单元,用于在预设的日志对照表中查询得到与所述目标业务数据关联的目标日志文件;
业务数据提取单元,用于从所述目标日志文件中提取所述目标业务数据。
进一步的,所述业务数据提取单元可以包括:
单行日志判断子单元,用于判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件;
数据提取子单元,用于若所述目标日志文件为单行的日志文件,则采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
日志转换子单元,用于若所述目标日志文件不是单行的日志文件,则将所述目标日志文件转换为单行的日志文件。
进一步的,所述日志转换子单元可以包括:
日志记录搜索孙单元,用于从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
日志内容合并孙单元,用于将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
更进一步的,所述日志内容合并孙单元可以包括:
第一搜索孙单元,用于在所述目标日志记录中搜索第一字符串和第二字符串;
第一行合并孙单元,用于以所述第一字符串为行起始位置、所述第二字符串为行结束位置,将所述第一字符串、所述第二字符串、所述第一字符串和第二字符串之间的日志内容合并成一行日志内容;
第二搜索孙单元,用于在所述目标日志记录中搜索包含第三字符串的多行日志内容;
第二行合并孙单元,用于将所述多行日志内容合并成一行日志内容。
进一步的,所述日志转换子单元还可以包括:
第三搜索孙单元,用于在所述目标日志记录中搜索第四字符串;
字符串替换孙单元,用于将所述第四字符串替换为预设的第五字符串。
进一步的,所述日志转换子单元还可以包括:
过滤器定义孙单元,用于定义行过滤器和列过滤器,所述行过滤器包含需要滤除的日志内容的行编号,所述列过滤器包含需要滤除的日志内容的列编号;
日志过滤孙单元,用于将所述目标日志文件中所述行编号对应的日志内容和所述列编号对应的日志内容滤除。
进一步的,所述业务数据采集模块可以包括:
部署包嵌入单元,用于将预设的部署包嵌入终端系统的特定中间件;
性能数据采集单元,用于利用所述部署包采集所述特定中间件的性能数据。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如图1或图2a表示的任意一种业务数据的监控方法的步骤。
本申请实施例还提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如图1或图2a表示的任意一种业务数据的监控方法的步骤。

Claims (20)

  1. 一种业务数据的监控方法,其特征在于,包括:
    获取预先编写的自定义脚本;
    将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
    执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
    在预设的显示界面对所述目标业务数据进行监控。
  2. 根据权利要求1所述的业务数据的监控方法,其特征在于,所述采集所述数据监控任务对应的目标业务数据包括:
    在预设的日志对照表中查询得到与所述目标业务数据关联的目标日志文件;
    从所述目标日志文件中提取所述目标业务数据。
  3. 根据权利要求2所述的业务数据的监控方法,其特征在于,所述从所述目标日志文件中提取所述目标业务数据包括:
    判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件;
    若所述目标日志文件为单行的日志文件,则采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
    若所述目标日志文件不是单行的日志文件,则将所述目标日志文件转换为单行的日志文件。
  4. 根据权利要求3所述的业务数据的监控方法,其特征在于,所述将所述目标日志文件转换为单行的日志文件包括:
    从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
    将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
  5. 根据权利要求4所述的业务数据的监控方法,其特征在于,所述将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容包括:
    在所述目标日志记录中搜索第一字符串和第二字符串;
    以所述第一字符串为行起始位置、所述第二字符串为行结束位置,将所述第一字符串、所述第二字符串、所述第一字符串和第二字符串之间的日志内容合并成一行日志内容;
    和/或
    在所述目标日志记录中搜索包含第三字符串的多行日志内容;
    将所述多行日志内容合并成一行日志内容。
  6. 根据权利要求4所述的业务数据的监控方法,其特征在于,在将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容之前,还包括:
    在所述目标日志记录中搜索第四字符串;
    将所述第四字符串替换为预设的第五字符串。
  7. 根据权利要求4所述的业务数据的监控方法,其特征在于,在将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容之后,还包括:
    定义行过滤器和列过滤器,所述行过滤器包含需要滤除的日志内容的行编号,所述列过滤器包含需要滤除的日志内容的列编号;
    将所述目标日志文件中所述行编号对应的日志内容和所述列编号对应的日志内容滤除。
  8. 根据权利要求1至7中任一项所述的业务数据的监控方法,其特征在于,所述采集所述数据监控任务对应的目标业务数据包括:
    将预设的部署包嵌入终端系统的中间件;
    利用所述部署包采集所述中间件的性能数据。
  9. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:
    获取预先编写的自定义脚本;
    将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
    执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
    在预设的显示界面对所述目标业务数据进行监控。
  10. 根据权利要求9所述的计算机可读存储介质,其特征在于,所述采集所述数据监控任务对应的目标业务数据包括:
    在预设的日志对照表中查询得到与所述目标业务数据关联的目标日志文件;
    从所述目标日志文件中提取所述目标业务数据。
  11. 根据权利要求10所述的计算机可读存储介质,其特征在于,所述从所述目标日志文件中提取所述目标业务数据包括:
    判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件;
    若所述目标日志文件为单行的日志文件,则采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
    若所述目标日志文件不是单行的日志文件,则将所述目标日志文件转换为单行的日志文件。
  12. 根据权利要求11所述的计算机可读存储介质,其特征在于,所述将所述目标日志文件转换为单行的日志文件包括:
    从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
    将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
  13. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取预先编写的自定义脚本;
    将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
    执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
    在预设的显示界面对所述目标业务数据进行监控。
  14. 根据权利要求13所述的终端设备,其特征在于,所述采集所述数据监控任务对应的目标业务数据包括:
    在预设的日志对照表中查询得到与所述目标业务数据关联的目标日志文件;
    从所述目标日志文件中提取所述目标业务数据。
  15. 根据权利要求14所述的终端设备,其特征在于,所述从所述目标日志文件中提取所述目标业务数据包括:
    判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件;
    若所述目标日志文件为单行的日志文件,则采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
    若所述目标日志文件不是单行的日志文件,则将所述目标日志文件转换为单行的日志文件。
  16. 根据权利要求15所述的终端设备,其特征在于,所述将所述目标日志文件转换为单行的日志文件包括:
    从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
    将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
  17. 一种业务数据的监控装置,其特征在于,包括:
    脚本获取模块,用于获取预先编写的自定义脚本;
    脚本写入模块,用于将所述自定义脚本写入数据监控任务的功能配置文件,得到自定义的数据监控任务;
    业务数据采集模块,用于执行所述数据监控任务,采集所述数据监控任务对应的目标业务数据;
    业务数据监控模块,用于在预设的显示界面对所述目标业务数据进行监控。
  18. 根据权利要求17所述的业务数据的监控装置,其特征在于,所述业务数据采集模块包括:
    日志查询单元,用于在预设的日志对照表中查询得到与所述目标业务数据关联的目标日志文件;
    业务数据提取单元,用于从所述目标日志文件中提取所述目标业务数据。
  19. 根据权利要求18所述的业务数据的监控装置,其特征在于,所述业务数据提取单元包括:
    单行日志判断子单元,用于判断所述目标日志文件是否为单行的日志文件,所述单行的日志文件指每条日志记录均为一行的日志文件;
    数据提取子单元,用于若所述目标日志文件为单行的日志文件,则采用列分割和正则表达式提取的方式从所述目标日志文件中提取出所述目标业务数据;
    日志转换子单元,用于若所述目标日志文件不是单行的日志文件,则将所述目标日志文件转换为单行的日志文件。
  20. 根据权利要求19所述的业务数据的监控装置,其特征在于,所述日志转换子单元包括:
    日志记录搜索孙单元,用于从所述目标日志文件中搜索包含多行日志内容的目标日志记录;
    日志内容合并孙单元,用于将所述目标日志记录中包含特定字符串的多行日志内容合并成一行日志内容,然后将所述目标日志记录中不含所述特定字符串的各行日志内容删除。
PCT/CN2018/104973 2018-06-14 2018-09-11 一种业务数据的监控方法、存储介质、终端设备及装置 WO2019237532A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810613809.XA CN108847977B (zh) 2018-06-14 2018-06-14 一种业务数据的监控方法、存储介质和服务器
CN201810613809.X 2018-06-14

Publications (1)

Publication Number Publication Date
WO2019237532A1 true WO2019237532A1 (zh) 2019-12-19

Family

ID=64202382

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104973 WO2019237532A1 (zh) 2018-06-14 2018-09-11 一种业务数据的监控方法、存储介质、终端设备及装置

Country Status (2)

Country Link
CN (1) CN108847977B (zh)
WO (1) WO2019237532A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782470A (zh) * 2020-06-30 2020-10-16 中国工商银行股份有限公司 分布式容器日志数据处理方法及装置
CN112052134A (zh) * 2020-07-21 2020-12-08 北京奇艺世纪科技有限公司 一种业务数据的监控方法及装置
CN112511643A (zh) * 2020-12-07 2021-03-16 北京天融信网络安全技术有限公司 一种报文数据提取方法及装置
CN112711511A (zh) * 2020-12-29 2021-04-27 航天信息股份有限公司 一种基于脚本服务器对终端设备进行监控的方法及系统
CN113535521A (zh) * 2021-07-28 2021-10-22 中国建设银行股份有限公司 一种数据监控方法及装置
CN115514674A (zh) * 2022-08-24 2022-12-23 智网安云(武汉)信息技术有限公司 一种基于脚本远程连接的监控项自动创建方法及设备

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110401698A (zh) * 2019-06-27 2019-11-01 苏州浪潮智能科技有限公司 一种基于任务异步分发的监控数据采集方法、装置和系统
CN110618911B (zh) * 2019-08-15 2022-12-09 中国平安财产保险股份有限公司 数据监控方法、装置、存储介质和服务器
CN112445672A (zh) * 2019-08-30 2021-03-05 北京神州泰岳软件股份有限公司 一种运维监控方法和装置
CN110532159B (zh) * 2019-09-03 2023-04-18 北京百度网讯科技有限公司 数据监听方法、装置、设备及计算机可读存储介质
CN111045893B (zh) * 2019-12-12 2023-09-22 网银在线(北京)科技有限公司 监控任务的执行方法、装置及系统、存储介质、电子装置
CN111209165B (zh) * 2020-01-05 2021-03-16 光大兴陇信托有限责任公司 一种基于通道的两级监控处理方法
CN111290355B (zh) * 2020-02-27 2021-06-22 中电九天智能科技有限公司 记录及查找log的方法
CN112363900B (zh) * 2020-11-16 2022-09-27 中国科学院计算技术研究所 一种基于插桩的主机内容器网络性能分析方法及系统
CN114143192A (zh) * 2021-12-03 2022-03-04 中国建设银行股份有限公司 Weblogic T3过滤器的配置方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084150A1 (en) * 1999-01-15 2003-05-01 Hewlett-Packard Development Company, L.P. A Delaware Corporation Automatic notification rule definition for a network management system
CN104462612A (zh) * 2015-01-05 2015-03-25 浪潮(北京)电子信息产业有限公司 一种监控数据库信息的方法和设备
CN106685839A (zh) * 2016-11-17 2017-05-17 上海斐讯数据通信技术有限公司 路由器长连接服务监控方法及系统
CN107678907A (zh) * 2017-05-22 2018-02-09 平安科技(深圳)有限公司 数据库业务逻辑监控方法、系统、及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739277A (zh) * 2009-12-08 2010-06-16 南京联创科技集团股份有限公司 基于自定义脚本方式管理业务监控系统的方法
CN102883350A (zh) * 2012-08-24 2013-01-16 中兴通讯股份有限公司 一种设备信息采集方法及系统
CN104486445B (zh) * 2014-12-30 2017-03-22 北京天云融创软件技术有限公司 一种基于云平台的分布式可扩展资源监控系统
CN105516293A (zh) * 2015-12-03 2016-04-20 国家电网公司 一种智能变电站云资源监控系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030084150A1 (en) * 1999-01-15 2003-05-01 Hewlett-Packard Development Company, L.P. A Delaware Corporation Automatic notification rule definition for a network management system
CN104462612A (zh) * 2015-01-05 2015-03-25 浪潮(北京)电子信息产业有限公司 一种监控数据库信息的方法和设备
CN106685839A (zh) * 2016-11-17 2017-05-17 上海斐讯数据通信技术有限公司 路由器长连接服务监控方法及系统
CN107678907A (zh) * 2017-05-22 2018-02-09 平安科技(深圳)有限公司 数据库业务逻辑监控方法、系统、及存储介质

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782470A (zh) * 2020-06-30 2020-10-16 中国工商银行股份有限公司 分布式容器日志数据处理方法及装置
CN111782470B (zh) * 2020-06-30 2023-08-22 中国工商银行股份有限公司 分布式容器日志数据处理方法及装置
CN112052134A (zh) * 2020-07-21 2020-12-08 北京奇艺世纪科技有限公司 一种业务数据的监控方法及装置
CN112511643A (zh) * 2020-12-07 2021-03-16 北京天融信网络安全技术有限公司 一种报文数据提取方法及装置
CN112711511A (zh) * 2020-12-29 2021-04-27 航天信息股份有限公司 一种基于脚本服务器对终端设备进行监控的方法及系统
CN112711511B (zh) * 2020-12-29 2023-09-01 航天信息股份有限公司 一种基于脚本服务器对终端设备进行监控的方法及系统
CN113535521A (zh) * 2021-07-28 2021-10-22 中国建设银行股份有限公司 一种数据监控方法及装置
CN115514674A (zh) * 2022-08-24 2022-12-23 智网安云(武汉)信息技术有限公司 一种基于脚本远程连接的监控项自动创建方法及设备
CN115514674B (zh) * 2022-08-24 2023-12-26 智网安云(武汉)信息技术有限公司 一种基于脚本远程连接的监控项自动创建方法及设备

Also Published As

Publication number Publication date
CN108847977B (zh) 2021-06-25
CN108847977A (zh) 2018-11-20

Similar Documents

Publication Publication Date Title
WO2019237532A1 (zh) 一种业务数据的监控方法、存储介质、终端设备及装置
US7668849B1 (en) Method and system for processing structured data and unstructured data
US11615082B1 (en) Using a data store and message queue to ingest data for a data intake and query system
US10366154B2 (en) Information processing device, information processing method, and computer program product
CN106878074B (zh) 流量过滤方法及装置
US11449371B1 (en) Indexing data at a data intake and query system based on a node capacity threshold
US11947614B1 (en) Method and system for centralized multi-instance deployment consolidation
CN109669795A (zh) 崩溃信息处理方法及装置
JP2010224705A (ja) ログ検索システム
CN112559463A (zh) 压缩文件处理的方法及装置
US10915510B2 (en) Method and apparatus of collecting and reporting database application incompatibilities
CN105550179B (zh) 一种网页收藏方法和浏览器插件
CN111258973A (zh) Redis慢日志的存储、展示方法、装置、设备和介质
US11599396B2 (en) Resegmenting chunks of data based on source type to facilitate load balancing
CN108228616A (zh) 日志信息处理方法、系统及装置
KR101161648B1 (ko) 데이터베이스 서버의 조작이력 생성 시스템 및 방법
CN104244204A (zh) 短信内容提取方法及系统
CN106802922B (zh) 一种基于对象的溯源存储系统及方法
CN109033306A (zh) 一种用于移动客户端的浏览网页整理方法及系统
CN112347066B (zh) 日志处理方法、装置及服务器和计算机可读存储介质
US9426173B2 (en) System and method for elimination of spam in a data stream according to information density
JP2016014980A (ja) ログ取込抽出システム
US8775528B2 (en) Computer readable recording medium storing linking keyword automatically extracting program, linking keyword automatically extracting method and apparatus
CN112231376A (zh) 一种用于离线数据采集的方法和装置
JP6048555B1 (ja) 分類情報作成装置、分類情報作成方法、分類情報作成プログラム、検索装置、検索方法、及び、検索プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18922125

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18922125

Country of ref document: EP

Kind code of ref document: A1