CN116185856A - Software system health detection method, device, storage medium and equipment - Google Patents
Software system health detection method, device, storage medium and equipment Download PDFInfo
- Publication number
- CN116185856A CN116185856A CN202310160354.1A CN202310160354A CN116185856A CN 116185856 A CN116185856 A CN 116185856A CN 202310160354 A CN202310160354 A CN 202310160354A CN 116185856 A CN116185856 A CN 116185856A
- Authority
- CN
- China
- Prior art keywords
- index
- target
- rule
- log
- keyword
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000036541 health Effects 0.000 title claims abstract description 48
- 238000001514 detection method Methods 0.000 title claims abstract description 36
- 238000000034 method Methods 0.000 claims abstract description 62
- 238000001914 filtration Methods 0.000 claims description 41
- 238000012545 processing Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 11
- 230000000007 visual effect Effects 0.000 claims description 11
- 238000011144 upstream manufacturing Methods 0.000 claims description 10
- 230000004044 response Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 230000008901 benefit Effects 0.000 description 4
- 238000004140 cleaning Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3644—Debugging of software by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application provides a software system health detection method, a device, a storage medium and equipment, wherein in the method, an operation log of a target software system and index rules configured by a user are obtained, the operation log is analyzed according to each row, after a single-row log item is analyzed, a target index rule under the item is extracted from the index rules, the target index rule in a character string form is converted into structured data, the structured log in a target format is obtained based on the operation log, and the structured log is processed by utilizing the structured data, so that a target index capable of representing the health degree of the target software system is obtained. Therefore, the whole scheme is simple in configuration, high in universality and quick in response, so that the health detection of the target software system can be quickly achieved, and the normal operation of the service is ensured.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a storage medium, and a device for detecting software system health.
Background
With the development of internet technology, the business of each industry is rapidly increased, the stability of application faces an increasing challenge, and the reliability of a system is also gradually paid attention to more enterprises. Currently, in order to achieve reliability of a software system, multiple sets of observation systems are generally deployed in enterprises to perform health detection on the software system, where the observation systems include a link tracking system based on upstream and downstream observation, an index system based on application, a log system based on application, and the like. These observation systems are in different observation dimensions, each of which performs. However, due to the numerous projects, a single application access index needs to be arranged, developed and tested, and the time is long, so that the health detection efficiency of the projects is low, and the normal operation of the business is affected.
Disclosure of Invention
An embodiment of the present application is directed to providing a method, an apparatus, a storage medium, and a device for detecting health of a software system, and aims to solve the problem that the health detection efficiency of the software system is low and the normal operation of a service is affected in the related art.
In a first aspect, an embodiment of the present application provides a method for detecting health of a software system, including:
acquiring an operation log of a target software system and an index rule configured by a user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
after analyzing the item of each row in the running log, extracting a target index rule corresponding to the item from the index rule, and converting the target index rule into a grammar tree; the syntax tree is structured data;
and obtaining a structured log in a target format based on the running log, and processing the structured log based on the grammar tree to obtain a target index.
In the implementation process, the running log of the target software system and index rules configured by a user are obtained, the running log is analyzed according to each row, after the item of the single-row log is analyzed, the target index rule under the item is extracted from the index rules, the target index rule in the form of a character string is converted into structured data, the structured log in a target format is obtained based on the running log, and the structured log is processed by utilizing the structured data, so that the target index capable of representing the health degree of the target software system is obtained. Therefore, the whole scheme is simple in configuration, high in universality and quick in response, so that the health detection of the target software system can be quickly achieved, and the normal operation of the service is ensured.
Further, in some embodiments, the index rule is obtained from a preset database; before obtaining the index rule configured by the user, the method comprises the following steps:
and acquiring index rules set in the visual configuration page by a user, and storing the index rules in the preset database.
In the implementation process, the visual configuration page is provided, so that a user can conveniently set an entry of index rules, and a preset database is provided for maintaining the index rules, so that the user can configure the index rules in real time through the visual configuration page according to requirements, and the newly configured index can be effective in real time.
Further, in some embodiments, before extracting the target index rule corresponding to the item from the index rules, the method includes:
detecting whether the index rule is correct;
storing the index rule which is yes in the detection result and belongs to the starting state into a rule pool; the target index rule is extracted from the rule pool.
In the implementation process, before the index rule is used, the correctness of the index rule configured by the user can be detected, the index rule which is correct and belongs to the starting state is stored in the rule pool, the use is convenient, and a good foundation is laid for accurate health detection of the target software system.
Further, in some embodiments, the converting the target-index rule into a syntax tree includes:
dividing the target index rule into a plurality of keywords and values;
writing the value corresponding to the keyword into a grammar tree; the syntax tree includes nodes for the keywords.
In the implementation process, a specific mode for converting the target index rule in the form of a character string into the structured data is provided, so that subsequent index generation processing is facilitated.
Further, in some embodiments, the plurality of keywords includes: the method comprises the steps of a first keyword, a second keyword, a third keyword, a fourth keyword, a fifth keyword and a sixth keyword, wherein the first keyword is used for recording a running log filtering mode; the second keyword is used for analyzing the operation log and acquiring key information; the third keyword is used for declaring the name of the index; the fourth keyword is used for declaring the type of the index; the fifth keyword is used for declaring a label corresponding to the index; the sixth key is used to declare a value.
In the implementation process, reasonable and effective index log filtering rules can be quickly constructed through the keywords.
Further, in some embodiments, the target format is JSON format; the obtaining the structured log in the target format based on the running log includes:
analyzing the data format of the running log, and splitting the running log into a JSON format and a TEXT format if the data format of the running log is a mixed format.
In the implementation process, the format of the running log is analyzed, and the running log in the mixed format is split into the JSON format and the TEXT format, so that key information can be extracted from the running log according to rules for filtering, higher universality is realized, and meanwhile, the method has the advantage of simplicity in configuration.
Further, in some embodiments, the method further comprises:
and storing the target index into a designated storage area so that an upstream acquisition system grabs the target index from the designated storage area.
In the implementation process, after the target index is generated, the target index can be stored, and an upstream index acquisition system is waited to automatically grasp the target index, so that the normal operation of the service is effectively ensured.
In a second aspect, an embodiment of the present application provides a software system health detection device, including:
the acquisition module is used for acquiring the running log of the target software system and index rules configured by the user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
the analysis module is used for extracting a target index rule corresponding to each item from the index rules after analyzing the item of each row in the running log, and converting the target index rule into a grammar tree; the syntax tree is structured data;
and the processing module is used for acquiring the structured log in the target format based on the running log, and processing the structured log based on the grammar tree to obtain a target index.
In a third aspect, an electronic device provided in an embodiment of the present application includes: a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any one of the first aspects when the computer program is executed.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the method according to any of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer, causes the computer to perform the method according to any one of the first aspects.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part will be obvious from the description, or may be learned by practice of the techniques disclosed herein.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a software system health detection method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of a workflow of a software health detection system according to an embodiment of the present application;
FIG. 3 is a block diagram of a software system health detection device according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
As described in the background art, the related art has the problems that the health detection efficiency of the software system is low and the normal operation of the service is affected. Based on this, the embodiment of the application provides a software system health detection scheme to solve the above problem.
The embodiments of the present application are described below:
as shown in fig. 1, fig. 1 is a flowchart of a software system health detection method provided in an embodiment of the present application, where the method may be applied to a terminal or a server, and the terminal may be various electronic devices, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like; the server may be a single server or a distributed server cluster formed by a plurality of servers. The terminal or server provides a data processing environment that includes a software portion that includes primarily an operating system, such as Windows, linux, and a hardware portion that includes primarily computing resources, storage resources, etc., such as a CPU (Central Processing Unit ), memory, hard disk, etc. It should be noted that the terminal/server may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not limited in this application.
The method comprises the following steps:
in step 101, acquiring an operation log of a target software system and an index rule configured by a user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
the target software system mentioned in this step may be any software system that needs health detection, for example, in an enterprise, the target software system may include an OA (Office Automation ) system, a CRM (Customer Relationship Management, customer relationship management) system, enterprise instant messaging software, and the like. In this embodiment, faults and phenomena occurring in the target software system are detected by reading the running log of the target software system and the index rule configured by the user in real time.
In particular, the metrics referred to in this step may be parameters that can measure the performance of the target software system and/or reflect whether the target software system is malfunctioning, e.g., response time, resource usage, number of database syntax errors occurring, etc., and different software systems may correspond to different metrics. The index rule is a rule which can be used for analyzing and filtering the target software system so as to generate an index.
In some embodiments, the index rule may be obtained from a preset database; the method may include, prior to obtaining the user-configured index rule: and acquiring index rules set in the visual configuration page by a user, and storing the index rules in the preset database. That is, the solution of this embodiment may be implemented as a software health detection system, where the software health detection system includes at least a preset database and a visual configuration page, where the visual configuration page is used to provide an entry for setting index rules by a user, and the preset database is used to maintain the index rules, so that the user can configure the index rules in real time through the visual configuration page according to the requirement, and can make the newly configured index take effect in real time. It should be noted that, the visual configuration page not only provides an entry for a user to create a new index rule, but also can be used for modifying, deleting and querying the index rule, and can also be used for displaying index trend in real time and configuring alarm based on the index; in addition, the preset database can be used for maintaining other key information of the project, such as project names, index descriptions, creator information, original logs required for checking whether the index rules are correct, and the like, besides maintaining the index rules.
102, after analyzing the item to which each row in the running log belongs, extracting a target index rule corresponding to the item from the index rules, and converting the target index rule into a grammar tree; the syntax tree is structured data;
the method comprises the following steps: analyzing the received running log according to each row to obtain the item name of the single-row log, acquiring all index rules under the item from index rules configured by a user as target index rules according to the acquired item name, and converting the index rules in the form of character strings filled by the user into grammar trees in the form of structured data so as to facilitate quick reading of the system for log filtering.
In practical application, at least one item can be created for each software system in an enterprise, so that the number of items in the enterprise is often numerous, based on which, index rules corresponding to a plurality of items may be stored in a preset database, each item corresponds to at least one index rule, in order to obtain an accurate target index, the operation log needs to be analyzed, and the index rule under the item is extracted from index rules configured by a user according to the analyzed item name. In some embodiments, before the step of extracting the target index rule corresponding to the item from the index rules, the method may include: detecting whether the index rule is correct; storing the index rule which is yes in the detection result and belongs to the starting state into a rule pool; the target index rule is extracted from the rule pool. That is, before using the index rule, the correctness of the index rule configured by the user can be detected, and then the index rule which is correct and belongs to the enabled state is temporarily stored in the memory of the system, namely, the rule pool, so that the later processing logic can be conveniently used and taken, thereby laying a good foundation for carrying out accurate health detection on the target software system.
Further, in some embodiments, the converting the target-index rule into a syntax tree mentioned in this step may include: dividing the target index rule into a plurality of keywords and values; writing the value corresponding to the keyword into a grammar tree; the syntax tree includes nodes for the keywords. That is, the index rule filled in by the user is a character string formed by arbitrarily combining a plurality of keywords, after the software health detection system acquires a single index rule, the single index rule can be divided into independent keywords and values, then the values corresponding to the keywords are put into a grammar tree, and the grammar tree is a structural object, so that the target index rule in the form of the character string is converted into structural data, and the subsequent index generation processing is facilitated. The grammar tree can be regarded as a rule tree provided by a software health system, and a user writes index rules meeting the requirements of own projects according to the rule tree, and generates target indexes through the index rules so as to achieve the aim of project health detection.
Still further, the aforementioned plurality of keywords may include a first keyword, a second keyword, a third keyword, a fourth keyword, a fifth keyword, and a sixth keyword, wherein the first keyword is used to record a running log filtering manner; the second keyword is used for analyzing the operation log and acquiring key information; the third keyword is used for declaring the name of the index; the fourth keyword is used for declaring the type of the index; the fifth keyword is used for declaring a label corresponding to the index; the sixth key is used to declare a value. The first to sixth keywords are represented by FILTER, PARSE, DISPLAY, KIND, LABEL, VALUE in order, and the meanings of these keywords are as follows:
FILTER: the log filtering group is used for filtering the running log according to the FILTER rule configured by the user after receiving the running log of the application, and executing the next index rule by the software health detection system when the log accords with the filtering condition until all the index rules are executed, and directly discarding the current log when the log does not accord with the filtering;
PARSE: the method is used for analyzing the log, acquiring key information from the log and assigning the key information to the temporary variable, and can be used for FILTER log filtering rules and also can be used for the dimensionality of the LABEL statement index;
DISPLAY: the names of the indexes are used for identifying meanings of actions when the software system runs, and can be used for data display, alarming and statistics;
KIND: the type of the index is declared, such as counter class, gauge class, histogram class, etc., wherein the counter class indicates that the value of the index is increased or not decreased, for example, the value of the current index is 1, then the value of the index may be 1, 2, 3, 4, etc. at the next moment, and the value will not be changed to 0 or-1; the value of the gauge category indication index can be changed arbitrarily;
LABEL: the dimension used to label the metrics may be used to declare to which interface, which merchant, which user, etc. the current metrics correspond; it should be noted that one index can simultaneously declare a plurality of labels, which is beneficial to index classification and refinement;
VALUE: when an application log completely meets the index rule, the number of times of occurrence of the log or the value covered by the log is counted, the default is 1.0, and the value is increased by 1.0 each time the application log meets the index rule.
In implementation, the specific type of the keywords may be a character string, a plurality of keywords may be combined arbitrarily, and the plurality of keywords are divided by "|", for example, a complete index rule may be expressed as: the index rule is used to determine whether the software system has a database syntax error, and when the database syntax error occurs, the index activity_sql_error_total performs a 1-adding operation on an existing basis. Through the keywords, reasonable and effective index log filtering rules can be quickly constructed. Of course, in other embodiments, the index rules may also include other keywords, depending on the needs of a particular scenario, e.g., AS keywords may be used to declare one variable AS another temporary variable during the log parsing phase.
And 103, obtaining a structured log in a target format based on the running log, and processing the structured log based on the grammar tree to obtain a target index.
The method comprises the following steps: in order to improve the general degree and reduce the configuration complexity, the read running log is analyzed to obtain a structured log in a target format, the structured log is analyzed and filtered based on the grammar tree obtained in the previous step, and the log meeting the filtering condition is subjected to index generation, label generation and assignment, so that a target index capable of representing the current health degree of a target software system is obtained.
In some embodiments, the target format referred to in this step may be JSON format, and obtaining the structured log of the target format based on the running log may include: analyzing the data format of the running log, and splitting the running log into a JSON format and a TEXT format if the data format of the running log is a mixed format. That is, the format of the running log is parsed, whether it is JSON format, TEXT format or mixed format is determined, and the running log of mixed format is automatically split into JSON format and TEXT format, so that key information can be extracted therefrom according to rules for filtering. Thus, higher universality is realized, and meanwhile, the method has the advantage of simple configuration.
Further, the method may further include: and storing the target index into a designated storage area so that an upstream acquisition system grabs the target index from the designated storage area. That is, after the target index is generated, the target index can be stored, and the upstream index acquisition system is waited to automatically grasp the target index, so that the normal operation of the service is effectively ensured. In addition, after the upstream acquisition system acquires, the software health detection system can display, alarm, count and analyze through the target index so as to improve the use experience of a user.
According to the embodiment of the application, the running log of the target software system and index rules configured by a user are obtained, the running log is analyzed according to each row, after a single-row log item is analyzed, the target index rules under the item are extracted from the index rules, the target index rules in the form of character strings are converted into structured data, the structured log in a target format is obtained based on the running log, and the structured log is processed by the structured data, so that a target index capable of representing the health degree of the target software system is obtained. Therefore, the whole scheme is simple in configuration, high in universality and quick in response, so that the health detection of the target software system can be quickly achieved, and the normal operation of the service is ensured.
For a more detailed description of the solution of the present application, a specific embodiment is described below:
the embodiment provides a software health detection system, which comprises a configuration database, a visual configuration page and an index real-time cleaning end, wherein the configuration database is used for maintaining key information of a project, such as project names, index descriptions, creator information, index log filtering rules and original logs required by checking whether the rules are correct; the visual configuration page is used for facilitating the user to create, modify, delete and inquire the log filtering rule and detecting the correctness of the log filtering rule; the index real-time cleaning end is mainly used for cleaning out target indexes according to index log filtering rules configured by a user and storing the target indexes for collection by an upstream index collection system.
The workflow of the software health detection system is shown in fig. 2, and includes:
s201, reading running logs of all software systems in real time;
s202, receiving index log filtering rules configured by a user in real time;
s203, detecting whether the index log filtering rule is correct, if yes, executing S204, otherwise executing 212;
s204, putting the index log filtering rule into a rule pool to wait for use;
s205, analyzing the running log according to each row to obtain the names of the items to which the single-row log belongs;
s206, acquiring all index log filtering rules under the item from a rule pool according to the item name;
s207, analyzing the index log filtering rule into a grammar tree; specifically, the index log filtering rule filled in by the user is a character string formed by randomly combining a plurality of keywords, after the software health detection system acquires a single rule, the character string is firstly divided into independent keywords and values by using 'I', and then the values corresponding to the keywords are put into a grammar tree, wherein the grammar tree is a structure object, and the structure object comprises the following contents: one or more FILTER groups for recording the filtering mode; one or more PARSE groups for parsing the log and obtaining key data; a DISPLAY for declaring the index name; a LABEL, the user declares that the index has LABELs; a VALUE for declaring a VALUE; a KIND for declaring the index categories;
s208, detecting the data format of a single-line log, judging whether the log is in a standard JSON format, a TEXT format or a mixed format, and if the log is in the mixed format, automatically splitting the log into the JSON format and the TEXT format;
s209, analyzing (PARSE) and Filtering (FILTER) the structured log according to the grammar tree, and then performing index generation (DISPLAY), LABEL generation (LABEL) and assignment (VALUE) on the log meeting the filtering condition to obtain a target index; in addition, discarding the logs which do not meet the filtering conditions, and preparing for the next index rule cleaning;
s210, saving the generated target index, and waiting for an upstream index acquisition system to automatically grasp;
s211, after being acquired by an upstream index acquisition system, displaying, alarming, counting and analyzing through target indexes;
s212, ending the flow.
According to the scheme, the configuration rules of the user can be dynamically monitored by reading the system running log in real time, and the software system can be quickly and real-timely subjected to health detection and data statistics.
Corresponding to the foregoing embodiments of the method, the present application further provides embodiments of the software system health detection device and a terminal to which the software system health detection device is applied:
as shown in fig. 3, fig. 3 is a block diagram of a software system health detection device according to an embodiment of the present application, where the device includes:
an obtaining module 31, configured to obtain an operation log of the target software system and an index rule configured by a user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
the parsing module 32 is configured to parse out an item belonging to each row in the running log, extract a target index rule corresponding to the item from the index rules, and convert the target index rule into a syntax tree; the syntax tree is structured data;
and the processing module 33 is configured to obtain a structured log in a target format based on the running log, and process the structured log based on the syntax tree to obtain a target index.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
The application further provides an electronic device, please refer to fig. 4, and fig. 4 is a block diagram of an electronic device according to an embodiment of the application. The electronic device may include a processor 410, a communication interface 420, a memory 430, and at least one communication bus 440. Wherein the communication bus 440 is used to enable direct connection communication of these components. The communication interface 420 of the electronic device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The processor 410 may be an integrated circuit chip with signal processing capabilities.
The processor 410 may be a general-purpose processor, including a central processing unit (CPU, central Processing Unit), a network processor (NP, network Processor), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 410 may be any conventional processor or the like.
The Memory 430 may be, but is not limited to, random access Memory (RAM, random Access Memory), read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable Read Only Memory (EEPROM, electric Erasable Programmable Read-Only Memory), and the like. The memory 430 has stored therein computer readable instructions which, when executed by the processor 410, can cause the electronic device to perform the steps described above in relation to the method embodiment of fig. 1.
Optionally, the electronic device may further include a storage controller, an input-output unit.
The memory 430, the memory controller, the processor 410, the peripheral interface, and the input/output unit are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the elements may be electrically coupled to each other via one or more communication buses 440. The processor 410 is configured to execute executable modules stored in the memory 430, such as software functional modules or computer programs included in the electronic device.
The input-output unit is used for providing the user with the creation task and creating the starting selectable period or the preset execution time for the task so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 4 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 4, or have a different configuration than shown in fig. 4. The components shown in fig. 4 may be implemented in hardware, software, or a combination thereof.
The embodiment of the application further provides a storage medium, where instructions are stored, and when the instructions run on a computer, the computer program is executed by a processor to implement the method described in the method embodiment, so that repetition is avoided, and no further description is given here.
The present application also provides a computer program product which, when run on a computer, causes the computer to perform the method of the method embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for detecting health of a software system, comprising:
acquiring an operation log of a target software system and an index rule configured by a user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
after analyzing the item of each row in the running log, extracting a target index rule corresponding to the item from the index rule, and converting the target index rule into a grammar tree; the syntax tree is structured data;
and obtaining a structured log in a target format based on the running log, and processing the structured log based on the grammar tree to obtain a target index.
2. The method of claim 1, wherein the index rule is obtained from a preset database; before obtaining the index rule configured by the user, the method comprises the following steps:
and acquiring index rules set in the visual configuration page by a user, and storing the index rules in the preset database.
3. The method according to claim 2, wherein before extracting the target index rule corresponding to the item from the index rules, the method comprises:
detecting whether the index rule is correct;
storing the index rule which is yes in the detection result and belongs to the starting state into a rule pool; the target index rule is extracted from the rule pool.
4. The method of claim 1, wherein said converting said target-index rule into a syntax tree comprises:
dividing the target index rule into a plurality of keywords and values;
writing the value corresponding to the keyword into a grammar tree; the syntax tree includes nodes for the keywords.
5. The method of claim 4, wherein the plurality of keywords comprises: the method comprises the steps of a first keyword, a second keyword, a third keyword, a fourth keyword, a fifth keyword and a sixth keyword, wherein the first keyword is used for recording a running log filtering mode; the second keyword is used for analyzing the operation log and acquiring key information; the third keyword is used for declaring the name of the index; the fourth keyword is used for declaring the type of the index; the fifth keyword is used for declaring a label corresponding to the index; the sixth key is used to declare a value.
6. The method of claim 1, wherein the target format is JSON format; the obtaining the structured log in the target format based on the running log includes:
analyzing the data format of the running log, and splitting the running log into a JSON format and a TEXT format if the data format of the running log is a mixed format.
7. The method according to claim 1, wherein the method further comprises:
and storing the target index into a designated storage area so that an upstream acquisition system grabs the target index from the designated storage area.
8. A software system health detection device, comprising:
the acquisition module is used for acquiring the running log of the target software system and index rules configured by the user; the index rule is a rule for analyzing and filtering the running log to obtain an index representing the health degree of the target software system; the index rule is data in the form of a character string;
the analysis module is used for extracting a target index rule corresponding to each item from the index rules after analyzing the item of each row in the running log, and converting the target index rule into a grammar tree; the syntax tree is structured data;
and the processing module is used for acquiring the structured log in the target format based on the running log, and processing the structured log based on the grammar tree to obtain a target index.
9. A computer readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, implements the method according to any of claims 1 to 7.
10. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the computer program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310160354.1A CN116185856A (en) | 2023-02-23 | 2023-02-23 | Software system health detection method, device, storage medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310160354.1A CN116185856A (en) | 2023-02-23 | 2023-02-23 | Software system health detection method, device, storage medium and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116185856A true CN116185856A (en) | 2023-05-30 |
Family
ID=86432412
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310160354.1A Pending CN116185856A (en) | 2023-02-23 | 2023-02-23 | Software system health detection method, device, storage medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116185856A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117834706A (en) * | 2023-12-20 | 2024-04-05 | 北京比格大数据有限公司 | Software performance data acquisition method and device, equipment and storage medium |
CN119046884A (en) * | 2024-10-28 | 2024-11-29 | 苏交科集团股份有限公司 | Bridge health evaluation method, system and storage medium based on detection monitoring data fusion |
-
2023
- 2023-02-23 CN CN202310160354.1A patent/CN116185856A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117834706A (en) * | 2023-12-20 | 2024-04-05 | 北京比格大数据有限公司 | Software performance data acquisition method and device, equipment and storage medium |
CN119046884A (en) * | 2024-10-28 | 2024-11-29 | 苏交科集团股份有限公司 | Bridge health evaluation method, system and storage medium based on detection monitoring data fusion |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111813960B (en) | Knowledge graph-based data security audit model device, method and terminal equipment | |
WO2021068547A1 (en) | Log schema extraction method and apparatus | |
CN113760891B (en) | Data table generation method, device, equipment and storage medium | |
CN112445875B (en) | Data association and verification method and device, electronic equipment and storage medium | |
CN114461644B (en) | Data collection method, device, electronic device and storage medium | |
CN106371984A (en) | Data monitoring method, equipment and system | |
CN116185856A (en) | Software system health detection method, device, storage medium and equipment | |
CN110737689B (en) | Data standard compliance detection method, device, system and storage medium | |
CN114710368B (en) | A security event detection method, device and computer-readable storage medium | |
CN110019067A (en) | A kind of log analysis method and system | |
US8543552B2 (en) | Detecting statistical variation from unclassified process log | |
CN110837469A (en) | Data testing method and device, testing server and storage medium | |
CN117992416A (en) | Software detection method, device, chip and computer readable storage medium | |
CN113138974B (en) | Method and device for detecting database compliance | |
CN119473900A (en) | Comparative test methods, devices, equipment, storage media and program products | |
CN114491044A (en) | Log processing method and device | |
CN112948478A (en) | Link-based code analysis method and device, electronic equipment and storage medium | |
CN116471174B (en) | Log data monitoring system, method, device and storage medium | |
CN114328620B (en) | Data processing method, system, device and storage medium | |
CN111159010A (en) | Defect collecting method, defect reporting method and related device | |
CN115600037A (en) | Data acquisition method, device and equipment based on front-end buried point and storage medium | |
CN112346938B (en) | Operation auditing method and device, server and computer readable storage medium | |
CN116483735B (en) | Method, device, storage medium and equipment for analyzing influence of code change | |
CN117573491B (en) | A method, device, equipment and storage medium for locating performance bottlenecks | |
Li et al. | A Vectorization Method to Cloud Service Instance Data for Service Compliance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |