CN111026606A - Alarm method and device based on hystrix fuse monitoring and computer equipment - Google Patents

Alarm method and device based on hystrix fuse monitoring and computer equipment Download PDF

Info

Publication number
CN111026606A
CN111026606A CN201911107145.0A CN201911107145A CN111026606A CN 111026606 A CN111026606 A CN 111026606A CN 201911107145 A CN201911107145 A CN 201911107145A CN 111026606 A CN111026606 A CN 111026606A
Authority
CN
China
Prior art keywords
monitoring data
preset
monitoring
hystrix
fuse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911107145.0A
Other languages
Chinese (zh)
Inventor
翟小青
王富平
陈乃帅
华含青
孙迁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing Co Ltd
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 Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN201911107145.0A priority Critical patent/CN111026606A/en
Publication of CN111026606A publication Critical patent/CN111026606A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to an alarm method based on hystrix fuse monitoring. The method comprises the following steps: monitoring data for monitoring the hystrix fuse is obtained; storing the monitoring data into a preset database; acquiring the monitoring data from the preset database, and judging whether the monitoring data meets preset conditions; and when the monitoring data are judged to meet the preset conditions, generating alarm prompt information according to the monitoring data. According to the application, the acquired monitoring data of the hystrix fuse can be stored in the preset database, so that the monitoring data can be stored more durably, and the alarm prompt information can be generated according to the preset condition and the monitoring data, so that flexible monitoring is realized.

Description

Alarm method and device based on hystrix fuse monitoring and computer equipment
Technical Field
The application relates to the technical field of computer application, in particular to an alarm method and device based on hystrix fuse monitoring and computer equipment.
Background
In the field of micro-service architecture, commonly used technical selection schemes include spring group (cloud native application development tool), dubbo (distributed framework for remote service invocation), and kubernets (for managing containerized applications on multiple hosts in a cloud platform). The Kubernetes framework uses, among other things, an istio (open platform for connectivity, security enforcement, control and observation services) for traffic management and load balancing, which supports fusing of requests and fault detection parameters based on a pool of connections, each connection. The idio is of the weighter class and is powerful, but requires more operating costs in use. Aiming at the monitoring of the istio, the istio can also support aggregation of telemetering elements such as indexes, logs and the like, can support various adapters and can send data to various powerful monitoring tools.
At present, a dubbo framework and a spring bound framework generally adopt a hystrix (class library for helping to solve timeout processing and fault tolerance during interaction of a distributed system) fuse component of netflix for service fusing. The hystrix is lightweight, flexible to use, has monitoring capability aiming at service calling, and can monitor information of service fusing. However, when the hystrix is used to monitor the service call, the disadvantages that the storage of the monitoring data cannot be persisted and the monitoring mechanism is not flexible still exist.
Disclosure of Invention
Based on this, it is necessary to provide an alarm method, an alarm device, a computer device, and a storage medium based on hystrix fuse monitoring, which can store the acquired monitoring data of the hystrix fuse in a preset database, so that the storage of the monitoring data is more durable, and can generate alarm prompt information according to preset conditions and the monitoring data, thereby realizing flexible monitoring.
An alarm method based on hystrix fuse monitoring comprises the following steps:
acquiring monitoring data for monitoring the hystrix fuse;
storing the monitoring data into a preset database;
acquiring monitoring data from a preset database, and judging whether the monitoring data meets preset conditions;
and when the monitoring data meet the preset conditions, generating alarm prompt information according to the monitoring data.
In one embodiment, before obtaining the monitoring data for monitoring the hystrix fuse, the method includes:
monitoring the hystrix fuse by using a preset embedded point;
acquiring monitoring data of the monitored hystrix fuse, comprising the following steps:
and acquiring buried point information monitored by a preset buried point by using a preset rolling window rule to serve as monitoring data.
In one embodiment, the determining whether the monitored data satisfies the predetermined condition includes:
extracting running state data of a server to which the hystrix fuse belongs in the monitoring data, wherein the running state data comprises any one or more of the following items:
the response time, the calling times and the calling result of each time when the server is called;
determining the average response time and the calling failure rate of the server when being called in a specified time period according to the response time, the calling times and the calling result of each time when being called;
when the average response time is larger than a preset response time threshold value, judging that the monitoring data meets a preset condition;
or when the calling failure rate is greater than a preset failure rate threshold value, judging that the monitoring data meets the preset conditions.
In one embodiment, the method further comprises:
counting the response time, the calling times and the calling result of each time when the server is called, and respectively obtaining the distribution data of the response time, the calling times and the calling result of the server in the specified time period;
when an inquiry request of distributed data corresponding to the monitoring data sent by the terminal is received, the distributed data corresponding to the inquiry request is obtained and fed back to the terminal for display.
In one embodiment, the preset database is a database of a third-party distributed storage system, and the acquiring of the monitoring data from the preset database includes:
sending a data acquisition request of monitoring data to a third-party distributed storage system;
and receiving monitoring data fed back by the distributed storage system after the distributed storage system inquires the preset database.
In one embodiment, when it is determined that the monitoring data meets the preset condition, generating an alarm prompt message according to the monitoring data includes:
when the monitoring data meet the preset conditions, assembling the monitoring data according to configuration items of an alarm template in a preset configuration file to generate alarm prompt information;
and sending the alarm prompt information to a receiver corresponding to the receiver information according to the configuration item of the alarm mode and the configuration item of the receiver information in the preset configuration file.
In one embodiment, the method further comprises:
receiving a modification request for configuration items in a preset configuration file;
and modifying the corresponding configuration items in the preset configuration file according to the modification request.
An alarm device based on hystrix fuse monitoring, the device includes:
the acquisition module is used for acquiring monitoring data for monitoring the hystrix fuse;
the storage module is used for storing the monitoring data into a preset database;
the judging module is used for acquiring the monitoring data from the preset database and judging whether the monitoring data meet preset conditions;
and the generating module is used for generating alarm prompt information according to the monitoring data when the monitoring data is judged to meet the preset conditions.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any of the above embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the alarm method, the alarm device and the computer equipment based on the hystrix fuse monitoring, the method comprises the steps of obtaining monitoring data of the monitored hystrix fuse; storing the monitoring data into a preset database; acquiring monitoring data from a preset database, and judging whether the monitoring data meets preset conditions; and when the monitoring data meet the preset conditions, generating alarm prompt information according to the monitoring data. According to the application, the acquired monitoring data of the hystrix fuse can be stored in the preset database, so that the monitoring data can be stored more durably, and the alarm prompt information can be generated according to the preset condition and the monitoring data, so that flexible monitoring is realized.
Drawings
FIG. 1 is an application environment diagram of an alarm method based on hystrix fuse monitoring in an exemplary embodiment of the present application;
FIG. 2 is a system architecture diagram of an alarm system based on hystrix fuse monitoring provided in an exemplary embodiment of the present application;
FIG. 3 is a schematic flow chart of an alarm method based on hystrix fuse monitoring provided in an exemplary embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a process of determining whether monitored data meets a preset condition according to an exemplary embodiment of the present application;
FIG. 5 is a block diagram of an alarm device based on hystrix fuse monitoring provided in an exemplary embodiment of the present application;
fig. 6 is an internal structural diagram of a computer device provided in an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, fig. 1 is a schematic application environment diagram of an alarm method based on hystrix fuse monitoring according to an exemplary embodiment of the present application. As shown in fig. 1, the alarm system based on hystrix fuse monitoring includes a server 100 and a terminal 101. The server 100 and the terminal 101 communicate with each other through a network 102.
The server 100 is configured to obtain monitoring data for monitoring the hystrix fuse, store the monitoring data in a preset database, obtain the monitoring data from the preset database, process the monitoring data to obtain alarm prompt information, and push the alarm prompt information to the terminal 101 for display. The server 100 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
The terminal 101 is configured to receive the alarm prompt information pushed by the server 100 and then display the alarm prompt information on a user interface. The terminal 101 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, desktop computers, and the like.
The network 102 is used to implement a network connection between the server 100 and the terminal 101. In particular, the network 103 may include various types of wired or wireless networks.
Referring to fig. 2, fig. 2 is a system architecture diagram of an alarm system based on hystrix fuse monitoring in a possible application scenario. As shown in fig. 2, the alarm system based on hystrix fuse monitoring system includes a server 200 and a third-party distributed storage system 300. The server 200 may include four important modules, namely a monitoring data persistence center 201, a fuse monitoring center 202, a fuse monitoring configuration center 203, and an alarm center 204, and adopts a distributed deployment manner.
Specifically, the monitoring data persistence center 201 is configured to collect monitoring data and store the monitoring data in a preset database of the third-party distributed storage system 300, where the third-party distributed storage system 300 provides functions of storing and retrieving the monitoring data.
The fuse monitoring center 202 is configured to extract monitoring data from the third-party distributed storage system 300, and filter and analyze the monitoring data, specifically analyze response time distribution, call frequency distribution, average response time, call failure frequency, and the like.
The fuse monitoring configuration center 203 is configured to configure the alarm, and specifically includes configuring each configuration item in a preset configuration file, where the configuration item specifically includes: the preset condition for triggering alarm, the alarm template, the alarm frequency, the alarm prompting mode, the receiver information and the like.
The alarm center 204 is configured to obtain monitoring data in the third-party distributed storage system 300, perform alarm detection according to a preset configuration file configured by the fuse monitoring configuration center 203, and obtain and output alarm prompt information according to an alarm detection result.
In one embodiment, as shown in fig. 3, an alarm method based on hystrix fuse monitoring is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
and S11, acquiring monitoring data of the monitored hystrix fuse.
An interface in a micro-service framework may be a micro-service, each micro-service is interdependent, and if a certain micro-service runs slowly or even goes down, a caller thread is blocked, and an ANR (Application Not Responding dialog) error similar to that in Android, which is common in Android, occurs, that is, a caller process cannot release resources, so that the process occupies an increasingly large memory until the caller process hangs up. In this application, the effect of hystrix fuse is exactly the service of discovering the abnormal operation immediately, tells the caller no longer to call this service interface to avoid caller's service resource to consume and totally.
The application monitors service calls by using the hystrix fuse based on the above principle. Specifically, the monitoring data is obtained from the request event of the hystrix fuse by monitoring the request event of the hystrix fuse.
And S12, storing the monitoring data into a preset database.
According to the method and the device, after the monitoring data are acquired, the monitoring data are stored in the preset database, so that the storage time of the monitoring data is more durable, the monitoring data are not easy to lose, the integrity and the accuracy of the monitoring data are guaranteed, and a complete and reliable data base is provided for the subsequent processing of the monitoring data.
And S13, acquiring the monitoring data from the preset database, and judging whether the monitoring data meet preset conditions.
In the application, the monitoring data can be taken out from the preset database, compared with the preset conditions, and whether the monitoring data meets the preset conditions or not is judged.
The preset conditions in the application can be preset according to actual conditions. Specifically, the preset conditions may include, but are not limited to, the following:
the average response time of the current service call is greater than a preset response time threshold, the call failure rate of the current service is greater than a preset failure rate threshold, and the call failure times of the current service are greater than preset failure times.
And S14, when the monitoring data are judged to meet the preset conditions, generating alarm prompt information according to the monitoring data.
In the application, when the monitoring data is judged to meet the preset conditions, alarm prompt information is generated according to the monitoring data and the preset alarm template.
In one embodiment, before acquiring the monitoring data for monitoring the hystrix fuse, the method may further include:
monitoring the hystrix fuse by using a preset embedded point;
the acquiring of the monitoring data of the monitored hystrix fuse may include:
and acquiring buried point information monitored by a preset buried point by using a preset rolling window rule to serve as monitoring data.
In the application, the hystrix fuse is monitored by presetting the embedded points and the embedded point rule. The embedded point rule comprises a rolling window rule and embedded point information in the application. In the present application, the specific rule contents of the window scrolling rule are: and counting the monitoring data through a rolling window. Specifically, a plurality of buckets are divided in a sliding window time, the buckets are a small part of a rolling window, and the movement of the rolling window is performed by rolling in units of buckets and counting data. Assuming that the time width of each bucket is t seconds, the monitoring data is counted at time intervals of t seconds. By default, a sliding window contains 10 buckets (buckets), each Bucket having a time width of 1 second, and is responsible for 1 second of data statistics. Preferably, the time span of the rolling window and the time width of the bucket support configurable as well as modifiable.
Further, the embedded point information is data content to be monitored in the application. The monitoring data in this application includes but is not limited to: a fuse command index, a fuse thread pool index, and a fuse merge index.
Specifically, the fuse command index may specifically include the following data content:
basic information: the name, address url of the fuse service;
statistics of the connection: the success frequency of the current service call and the failure frequency of the call;
statistical information in Fallback (Fallback function): number of fuses;
statistical number of service invocations: average response time of current service call, TP90(Top Percentile90, Top 90 Percentile), TP99, TP 999;
property information of the fuses.
The fuse thread pool index may specifically include the following data content:
basic information: the name, address url of the fuse service;
statistical information of the thread pool: core thread number, maximum thread number, queue number and fusing number;
the fuse merge indicators may include: statistics of threads and average execution time in batches.
Specifically, indexes such as TP90, TP99, TP999 and the like are commonly used in a system performance monitoring scene, and refer to the conditions of being higher than the percentage lines of 90%, 99%, 999% and the like. In the present application, the TP90 index: it means that the time consumed by each call of the current server is counted in a period of time (e.g. 5 minutes), and the times are sorted from small to large, and the value of the 90 th percent is taken as the value of TP 90. The calculation modes of the TP99, TP999 and TP90 are consistent and respectively represent different performance requirements for the current service call, the TP90 is relatively high, and the TP99 and TP999 have high performance requirements.
Referring to fig. 4, in an embodiment, the determining whether the monitored data meets the predetermined condition includes the following steps:
s131, extracting running state data of a server to which the hystrix fuses belong in the monitoring data, wherein the running state data comprises but is not limited to any one or more of the following items:
the response time, the calling times and the calling result of each time when the server is called;
s132, determining the average response time and the calling failure rate of the server in the appointed time period when being called according to the response time, the calling times and the calling result of each time when being called;
s133, when the average response time is larger than a preset response time threshold, judging that the monitoring data meet a preset condition;
and S134, or when the calling failure rate is greater than the preset failure rate threshold value, judging that the monitoring data meet the preset conditions.
In this application, the operation status data may further include: the values of TP90, TP99, and TP999 within a specified time period. Accordingly, the preset condition may include any one or more of the following:
the average response time is greater than a preset response time threshold;
the calling failure rate is greater than a preset failure rate threshold value;
the times of calling failure of the server in the specified time period are greater than the preset times;
the value of TP90 called by the current server in a specified time period is larger than a preset first time threshold;
the value of TP99 currently called by the server within a specified time period is greater than a preset second time threshold;
and the value of TP999 called by the current server in a specified time period is larger than a preset condition such as a preset third time threshold value.
Correspondingly, when the average response time is greater than the preset response time threshold, judging that the monitoring data meets the preset condition;
when the calling failure rate is greater than a preset failure rate threshold value, judging that the monitoring data meet preset conditions;
when the number of times of server calling failure in a specified time period is greater than the preset number of times, judging that the monitoring data meets the preset condition;
when the value of TP90 called by the current server in a specified time period is larger than a preset first time threshold value, judging that the monitoring data meet a preset condition;
when the value of TP99 called by the current server in a specified time period is larger than a preset second time threshold, judging that the monitoring data meet a preset condition;
and when the value of TP999 called by the current server in a specified time period is larger than a preset third time threshold value, judging that the monitoring data meets the preset condition.
In one embodiment, the method may further include:
counting the response time, the calling times and the calling result of each time when the server is called, and respectively obtaining the distribution data of the response time, the calling times and the calling result of the server in the specified time period;
when an inquiry request of distributed data corresponding to the monitoring data sent by the terminal is received, the distributed data corresponding to the inquiry request is obtained and fed back to the terminal for display.
Preferably, the application can also count the values of TP90, TP99 and TP999 in each time period and generate the distribution data of each index over time. When an inquiry request of distribution data corresponding to TP90 or other TP indexes sent by a terminal is received, the distribution data corresponding to the inquiry request is obtained and fed back to the terminal for display.
According to the method and the device, the query visual page of the monitoring data is provided, filtering can be carried out according to parameters such as the address of the query request, the query time and the like, the monitoring data pointed by the query request is obtained, the distribution data of the monitoring data is further obtained, and the distribution data is fed back to the terminal for display. According to the method and the device, a rigid real-time monitoring page carried by the hystrix fuse is abandoned, the distributed data of each monitoring data along with time is obtained by utilizing the persistent monitoring data stored in a preset database to be counted and fed back to the terminal for display, personalized interaction is achieved, and the problems that monitoring data query interactivity is poor and a monitoring mechanism is rigid in the prior art are solved.
In one embodiment, the obtaining of the monitoring data from the preset database includes:
sending a data acquisition request of monitoring data to a third-party distributed storage system;
and receiving monitoring data fed back by the distributed storage system after the distributed storage system inquires the preset database.
In the application, the preset database can be a database of a third-party distributed storage system, and can also be a database of the alarm system based on hystrix fuse monitoring in the application. When the monitoring data is stored in the third-party distributed storage system, the characteristics of distributed storage can be utilized to realize the tracing and query of the monitoring data, and when the monitoring data in one of the storage nodes is lost, the data can be retrieved from other nodes, so that the reliable storage of the monitoring data is realized.
In the application, the monitoring data are stored in the preset database, so that the problem that in the prior art, the monitoring data are limited in time of a rolling window and are not persistent, and the monitoring data are lost easily is solved.
In one embodiment, when it is determined that the monitoring data meets the preset condition, generating an alarm prompt according to the monitoring data includes:
when the monitoring data meet the preset conditions, assembling the monitoring data according to configuration items of an alarm template in a preset configuration file to generate alarm prompt information;
and sending the alarm prompt information to a receiver corresponding to the receiver information according to the configuration item of the alarm mode and the configuration item of the receiver information in the preset configuration file.
In the application, a preset configuration file for alarming is preset, wherein the preset configuration file comprises a plurality of configuration items, and the configuration items include, but are not limited to, the following:
monitoring url, alarm frequency, alarm template, alarm granularity, alarm mode, receiver information and the like.
The alarm template comprises an alarm prompt message generation rule and a layout rule. In one possible design, the alarm template may be:
1, average response time alarm template
The average consumed time of the interface A responding to each request reaches T3 in the time period from the starting time T1 to the ending time T2, and the average consumed time is higher than the preset response time threshold value M.
The average response time alarm template includes url of the current interface, statistical start time and end time, average response time for processing each request, and a size relationship between the average time and a preset response time threshold M.
2, fusing alarm template
The blowing times of the interface B requests N times within the time period from the starting time T3 to the ending time T4, and the blowing times are higher than a preset blowing time threshold value N1 times.
The fusing alarm template includes url of the current interface, the counted start time and end time, the fusing times requested within the counted time, and the size relationship between the fusing times and the preset fusing time threshold N1.
Further, the alarm mode is a notification mode of alarm prompt information. The alert modes may include, but are not limited to: mailbox, short message, and IM (Instant Messaging) modes.
In this application, through with the monitoring data storage who collects in predetermineeing the database for monitoring data is more lasting, and the follow-up condition of predetermineeing that utilizes this lasting monitoring data and the trigger alarm of being convenient for realizes abundanter warning and reminds, plays the bigger effect of monitoring data.
In one embodiment, the method may further include:
receiving a modification request for configuration items in a preset configuration file;
and modifying the corresponding configuration items in the preset configuration file according to the modification request.
According to the method and the device, when a newly increased request for the configuration items in the preset configuration file is received, the newly increased configuration items in the newly increased request are extracted, and the newly increased configuration items are added to the preset configuration file.
When a deletion request for the configuration items in the preset configuration file is received, the configuration items to be deleted in the deletion request are extracted, and the configuration items to be deleted are deleted from the preset configuration file.
And when a modification request for the configuration items in the preset configuration file is received, modifying the corresponding configuration items in the preset configuration file according to the modification request.
In the application, the setting and modification of the alarm configuration items can be realized, the flexible alarm reminding is realized, and the defects that the alarm is not supported and the flexible alarm configuration is not supported in the prior art are overcome.
In one embodiment, as shown in fig. 5, there is provided an alarm device based on hystrix fuse monitoring, comprising:
the acquiring module 11 is used for acquiring monitoring data for monitoring the hystrix fuse;
the storage module 12 is used for storing the monitoring data into a preset database;
the judging module 13 is configured to obtain monitoring data from a preset database, and judge whether the monitoring data meets a preset condition;
and the generating module 14 is configured to generate alarm prompt information according to the monitoring data when it is determined that the monitoring data meets the preset condition.
In one embodiment, before acquiring the monitoring data for monitoring the hystrix fuse, the method further includes:
monitoring the hystrix fuse by using a preset embedded point;
the above-mentioned obtaining module 11 includes:
and the acquisition unit is used for acquiring the embedded point information monitored by the preset embedded point by using a preset rolling window rule as monitoring data.
In one embodiment, the determining module 13 includes:
the judging unit is used for extracting the running state data of the server to which the hystrix fuse belongs in the monitoring data, and the running state data comprises any one or more of the following items:
the response time, the calling times and the calling result of each time when the server is called;
determining the average response time and the calling failure rate of the server when being called in a specified time period according to the response time, the calling times and the calling result of each time when being called;
when the average response time is larger than a preset response time threshold value, judging that the monitoring data meets a preset condition;
or when the calling failure rate is greater than a preset failure rate threshold value, judging that the monitoring data meets the preset conditions.
In one embodiment, the determining module 13 further includes:
the analysis unit is used for counting the response time, the calling times and the calling result of each time when the server is called, and respectively obtaining the distribution data of the response time, the calling times and the calling result of the server in the specified time period;
when an inquiry request of distributed data corresponding to the monitoring data sent by the terminal is received, the distributed data corresponding to the inquiry request is obtained and fed back to the terminal for display.
In one embodiment, the preset database is a database of a third-party distributed storage system, and the determining module 13 includes:
the query unit is used for sending a data acquisition request of the monitoring data to the third-party distributed storage system;
and receiving monitoring data fed back by the distributed storage system after the distributed storage system inquires the preset database.
In one embodiment, the generating module 14 includes:
the generating unit is used for assembling the monitoring data according to the configuration items of the alarm template in the preset configuration file when the monitoring data meet the preset conditions, and generating alarm prompt information;
and sending the alarm prompt information to a receiver corresponding to the receiver information according to the configuration item of the alarm mode and the configuration item of the receiver information in the preset configuration file.
In one embodiment, the method further includes:
receiving a modification request for configuration items in a preset configuration file;
and modifying the corresponding configuration items in the preset configuration file according to the modification request.
In one embodiment, a computer device is provided, which may be a service processing server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide the determining and controlling capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external first terminal through a network connection. The computer program is executed by a processor to realize an alarm method based on hystrix fuse monitoring. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring monitoring data for monitoring the hystrix fuse;
storing the monitoring data into a preset database;
acquiring monitoring data from a preset database, and judging whether the monitoring data meets preset conditions;
and when the monitoring data meet the preset conditions, generating alarm prompt information according to the monitoring data.
In one embodiment, before the processor executes the computer program to obtain the monitoring data of the monitored hystrix fuse, the following steps are specifically implemented:
monitoring the hystrix fuse by using a preset embedded point;
when the processor executes the computer program to realize the step of acquiring the monitoring data of the monitored hystrix fuse, the following steps are specifically realized:
and acquiring buried point information monitored by a preset buried point by using a preset rolling window rule to serve as monitoring data.
In one embodiment, when the processor executes the computer program to implement the step of determining whether the monitored data meets the preset condition, the following steps are specifically implemented:
extracting running state data of a server to which the hystrix fuse belongs in the monitoring data, wherein the running state data comprises any one or more of the following items:
the response time, the calling times and the calling result of each time when the server is called;
determining the average response time and the calling failure rate of the server when being called in a specified time period according to the response time, the calling times and the calling result of each time when being called;
when the average response time is larger than a preset response time threshold value, judging that the monitoring data meets a preset condition;
or when the calling failure rate is greater than a preset failure rate threshold value, judging that the monitoring data meets the preset conditions.
In one embodiment, the processor, when executing the computer program, implements the steps of:
counting the response time, the calling times and the calling result of each time when the server is called, and respectively obtaining the distribution data of the response time, the calling times and the calling result of the server in the specified time period;
when an inquiry request of distributed data corresponding to the monitoring data sent by the terminal is received, the distributed data corresponding to the inquiry request is obtained and fed back to the terminal for display.
In one embodiment, the processor executes a computer program to implement the preset database as a database of a third-party distributed storage system, and when the step of acquiring the monitoring data from the preset database is performed, the following steps are specifically implemented:
sending a data acquisition request of monitoring data to a third-party distributed storage system;
and receiving monitoring data fed back by the distributed storage system after the distributed storage system inquires the preset database.
In one embodiment, when the processor executes the computer program to implement the step of generating the alarm prompt information according to the monitoring data when the monitoring data is determined to meet the preset condition, the following steps are specifically implemented:
when the monitoring data meet the preset conditions, assembling the monitoring data according to configuration items of an alarm template in a preset configuration file to generate alarm prompt information;
and sending the alarm prompt information to a receiver corresponding to the receiver information according to the configuration item of the alarm mode and the configuration item of the receiver information in the preset configuration file.
In one embodiment, the processor, when executing the computer program, implements the steps of:
receiving a modification request for configuration items in a preset configuration file;
and modifying the corresponding configuration items in the preset configuration file according to the modification request.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An alarm method based on hystrix fuse monitoring, the method comprising:
acquiring monitoring data for monitoring the hystrix fuse;
storing the monitoring data into a preset database;
acquiring the monitoring data from the preset database, and judging whether the monitoring data meets preset conditions;
and when the monitoring data are judged to meet the preset conditions, generating alarm prompt information according to the monitoring data.
2. The method of claim 1, wherein prior to obtaining monitoring data for monitoring the hystrix fuses, the method comprises:
monitoring the hystrix fuse by using a preset embedded point;
the acquiring of the monitoring data of the monitoring hystrix fuse comprises the following steps:
and acquiring the buried point information monitored by the preset buried point by using a preset rolling window rule as the monitoring data.
3. The method according to claim 1, wherein the determining whether the monitoring data satisfies a preset condition includes:
extracting running state data of a server to which the hystrix fuse belongs in the monitoring data, wherein the running state data comprises any one or more of the following items:
the response time, the calling times and the calling result of each time when the server is called;
determining the average response time and the calling failure rate of the server when being called in a specified time period according to the response time, the calling times and the calling result of each time when being called;
when the average response time is larger than a preset response time threshold value, judging that the monitoring data meets the preset condition;
or when the calling failure rate is greater than a preset failure rate threshold value, judging that the monitoring data meets the preset condition.
4. The method of claim 3, further comprising:
counting the response time, the calling times and the calling result of each time when the server is called, and respectively obtaining the distribution data of the response time, the calling times and the calling result of the server in the specified time period;
when an inquiry request of distributed data corresponding to monitoring data sent by a terminal is received, the distributed data corresponding to the inquiry request is obtained and fed back to the terminal for display.
5. The method of claim 1, wherein the predetermined database is a database of a third-party distributed storage system, and the obtaining the monitoring data from the predetermined database comprises:
sending a data acquisition request of the monitoring data to the third-party distributed storage system;
and receiving the monitoring data fed back by the distributed storage system after inquiring the preset database.
6. The method according to claim 1, wherein when it is determined that the monitoring data satisfies the preset condition, generating an alarm prompt message according to the monitoring data includes:
when the monitoring data are judged to meet the preset conditions, assembling the monitoring data according to configuration items of an alarm template in a preset configuration file to generate the alarm prompt information;
and sending the alarm prompt information to a receiver corresponding to the receiver information according to the configuration item of the alarm mode and the configuration item of the receiver information in the preset configuration file.
7. The method of claim 6, further comprising:
receiving a modification request for the configuration items in the preset configuration file;
and modifying the corresponding configuration items in the preset configuration file according to the modification request.
8. An alarm device based on hystrix fuse monitoring, the device comprising:
the acquisition module is used for acquiring monitoring data for monitoring the hystrix fuse;
the storage module is used for storing the monitoring data into a preset database;
the judging module is used for acquiring the monitoring data from the preset database and judging whether the monitoring data meet preset conditions or not;
and the generating module is used for generating alarm prompt information according to the monitoring data when the monitoring data is judged to meet the preset conditions.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the hystrix fuse monitoring based alarm method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the hystrix fuse monitoring based alerting method of any of claims 1 to 7.
CN201911107145.0A 2019-11-13 2019-11-13 Alarm method and device based on hystrix fuse monitoring and computer equipment Pending CN111026606A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911107145.0A CN111026606A (en) 2019-11-13 2019-11-13 Alarm method and device based on hystrix fuse monitoring and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911107145.0A CN111026606A (en) 2019-11-13 2019-11-13 Alarm method and device based on hystrix fuse monitoring and computer equipment

Publications (1)

Publication Number Publication Date
CN111026606A true CN111026606A (en) 2020-04-17

Family

ID=70205596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911107145.0A Pending CN111026606A (en) 2019-11-13 2019-11-13 Alarm method and device based on hystrix fuse monitoring and computer equipment

Country Status (1)

Country Link
CN (1) CN111026606A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552587A (en) * 2020-04-30 2020-08-18 武汉众邦银行股份有限公司 Service fusing method based on sliding time window
CN112217684A (en) * 2020-12-03 2021-01-12 长沙树根互联技术有限公司 API gateway monitoring method, device and system
CN114328139A (en) * 2021-12-17 2022-04-12 江苏银承网络科技股份有限公司 Monitoring method and device for hall interface, storage medium and server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009075A (en) * 2017-11-27 2018-05-08 南京联创信息科技有限公司 Dynamic fusing determination methods based on Hystrix frames
CN108446111A (en) * 2018-03-26 2018-08-24 国家电网公司客户服务中心 A kind of micro services construction method based on Spring cloud

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009075A (en) * 2017-11-27 2018-05-08 南京联创信息科技有限公司 Dynamic fusing determination methods based on Hystrix frames
CN108446111A (en) * 2018-03-26 2018-08-24 国家电网公司客户服务中心 A kind of micro services construction method based on Spring cloud

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DEVINZHANG: "Hystrix 使用指南(3):监控报警", 《HTTPS://WWW.JIANSHU.COM/P/88A6C0C764F4》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552587A (en) * 2020-04-30 2020-08-18 武汉众邦银行股份有限公司 Service fusing method based on sliding time window
CN112217684A (en) * 2020-12-03 2021-01-12 长沙树根互联技术有限公司 API gateway monitoring method, device and system
CN114328139A (en) * 2021-12-17 2022-04-12 江苏银承网络科技股份有限公司 Monitoring method and device for hall interface, storage medium and server

Similar Documents

Publication Publication Date Title
CN109522287B (en) Monitoring method, system, equipment and medium for distributed file storage cluster
CN109726072B (en) WebLogic server monitoring and alarming method, device and system and computer storage medium
CN110224858B (en) Log-based alarm method and related device
CN108572907B (en) Alarm method, alarm device, electronic equipment and computer readable storage medium
CN110719318B (en) Message processing method and system
CN111026606A (en) Alarm method and device based on hystrix fuse monitoring and computer equipment
CN106059825A (en) Distributed system and configuration method
Picoreti et al. Multilevel observability in cloud orchestration
CN111522711B (en) Data monitoring processing system, method, execution end, monitoring end and electronic equipment
CN111143163A (en) Data monitoring method and device, computer equipment and storage medium
CN113127732A (en) Method and device for acquiring service data, computer equipment and storage medium
CN115248826A (en) Method and system for large-scale distributed graph database cluster operation and maintenance management
US20180300199A1 (en) System and method for maintaining the health of a machine
CN113031870A (en) Dynamic management method, device, storage medium and equipment for cluster system
CN113377626A (en) Visual unified alarm method, device, equipment and medium based on service tree
CN110674149B (en) Service data processing method and device, computer equipment and storage medium
CN109766198B (en) Stream processing method, device, equipment and computer readable storage medium
CN111611057A (en) Distributed retry method, device, electronic equipment and storage medium
CN112866319A (en) Log data processing method, system and storage medium
CN111339466A (en) Interface management method and device, electronic equipment and readable storage medium
CN110865921A (en) Data monitoring method and device, readable storage medium and electronic equipment
CN112711515B (en) Real-time monitoring method and device and electronic equipment
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
CN111382976B (en) Early warning data processing method and device, computer equipment and storage medium
CN104618461A (en) Mobile code cloud mobile phone-based server monitoring method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417

RJ01 Rejection of invention patent application after publication