CN110225113B - Service monitoring method and system - Google Patents
Service monitoring method and system Download PDFInfo
- Publication number
- CN110225113B CN110225113B CN201910496523.2A CN201910496523A CN110225113B CN 110225113 B CN110225113 B CN 110225113B CN 201910496523 A CN201910496523 A CN 201910496523A CN 110225113 B CN110225113 B CN 110225113B
- Authority
- CN
- China
- Prior art keywords
- state
- interface
- message
- monitoring
- service
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephonic Communication Services (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a service monitoring method in the technical field of service monitoring, which comprises the following steps: step S10, collecting all messages pushed by the third-party service interface through the subscription message system; step S20, the subscription message system monitors the collected messages and generates monitoring results; step S30, the subscription message system stores the monitoring result to the index back end for analysis; the invention also provides a service monitoring system. The invention has the advantages that: the pressure on the interface and the page of the third-party service is reduced, and the resources occupied by monitoring are reduced.
Description
Technical Field
The present invention relates to the technical field of service monitoring, and in particular, to a service monitoring method and system.
Background
With the advent of the information age, a large number of service integrators have emerged, which require access to various third party services in order to provide better services. In order to ensure the stability and reliability of the service, the service integrator needs to monitor the interfaces and pages that provide the third-party service.
Conventionally, the interfaces and pages of the third-party services are monitored through polling requests, but the traditional method can cause pressure on the interfaces and pages of the third-party services, and the polling requests are still performed during the period of using the third-party services at low frequency, which causes resource waste.
Therefore, how to provide a service monitoring method and system to reduce the pressure on the interface and page of the third-party service and reduce the resources occupied by monitoring becomes an urgent problem to be solved.
Disclosure of Invention
One of the technical problems to be solved by the present invention is to provide a service monitoring method, which reduces the pressure on the interface and page of the third-party service and reduces the resources occupied by monitoring.
The invention realizes one of the technical problems as follows: a method of service monitoring, the method comprising the steps of:
step S10, collecting all messages pushed by the third-party service interface through the subscription message system;
step S20, the subscription message system monitors the collected messages and generates monitoring results;
and step S30, the subscription message system stores the monitoring result to the back end of the index for analysis.
Further, the step S10 is specifically: the back end calls a third-party service interface to push the first message to a subscription message system; and the front end calls a third-party service interface to push the second message to the subscription message system.
Further, the first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information.
Further, the step S20 specifically includes:
step S21, creating a time threshold, a message monitoring type and an interface status label;
step S22, judging whether the type of the collected message is matched with the message monitoring type, if yes, entering step S23; if not, ending the flow;
step S23, judging the service state through the service access result information, and if the service is normal, entering step S24; if the service is abnormal, ending the process;
step S24, judging the state of the third-party service interface through the page return result, and if the state of the third-party service interface is normal, entering step S25; if the state of the third-party service interface is abnormal, the step S26 is entered;
step S25, adding one to the number of times of normal state, and judging whether the number of times of normal state is larger than or equal to a number threshold, if so, setting the interface state label as continuously available, and entering step S30; if yes, go to step S22;
step S26, judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is larger than a time threshold, if so, clearing the times of normal state, and entering step S22; if the number of state anomalies is less than the predetermined value, the number of state anomalies is increased by one, the interface state flag is set to be intermittently available, and the process proceeds to step S30.
Further, the step S30 is specifically: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface.
The second technical problem to be solved by the present invention is to provide a service monitoring system, which reduces the pressure on the interface and page of the third-party service and reduces the resources occupied by monitoring.
The invention realizes the second technical problem in the following way: a service monitoring system, the system comprising the following modules:
the message collection module is used for collecting all messages pushed by the third-party service interface through the subscription message system;
the message monitoring module is used for monitoring the collected messages by the subscription message system and generating a monitoring result;
and the monitoring result storage module is used for storing the monitoring result to the index back end for analysis by the subscription message system.
Further, the message collection module specifically includes: the back end calls a third-party service interface to push the first message to a subscription message system; and the front end calls a third-party service interface to push the second message to the subscription message system.
Further, the first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information.
Further, the message monitoring module specifically includes:
the device comprises a parameter establishing unit, a parameter monitoring unit and a parameter monitoring unit, wherein the parameter establishing unit is used for establishing a time threshold, a message monitoring type and an interface state label;
the type matching unit is used for judging whether the type of the collected message is matched with the message monitoring type, if so, the service state judging unit is started; if not, ending the flow;
the service state judging unit is used for judging the state of the service according to the service access result information, and if the service is normal, the service enters the interface state judging unit; if the service is abnormal, ending the process;
the interface state judging unit is used for judging the state of the third-party service interface according to the page return result, and if the state of the third-party service interface is normal, the interface state judging unit enters a state normal frequency setting unit; if the state of the third-party service interface is abnormal, entering a state abnormal frequency setting unit;
the system comprises a state normal frequency setting unit, a monitoring result storage module and a data processing module, wherein the state normal frequency setting unit is used for adding one to the normal frequency of the state and judging whether the normal frequency is greater than or equal to a frequency threshold value, if so, the interface state label is set to be continuously available and enters the monitoring result storage module; if the number is less than the preset number, entering a type matching unit;
the abnormal state frequency setting unit is used for judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is greater than a time threshold value or not, if so, resetting the normal state frequency and entering the type matching unit; and if the number of the state abnormity is less than the preset value, adding one to the number of the state abnormity, setting the interface state label as available intermittently, and entering a monitoring result storage module.
Further, the monitoring result storage module specifically includes: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface.
The invention has the advantages that:
1. by not analyzing the abnormal request when the service is abnormal, the pressure on the interface and the page of the third-party service is reduced, and the resource occupied by monitoring is reduced.
2. By storing the interface state label and the information triggering the abnormal state of the third-party service interface to the rear end of the index, the abnormal information can be counted and analyzed.
3. By analyzing the interface state of the third-party service when the service is normal, whether the interface state is intermittent abnormal or not can be conveniently mastered.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a flow chart of a service monitoring method of the present invention.
Detailed Description
Referring to fig. 1, a preferred embodiment of a service monitoring method according to the present invention includes the following steps:
step S10, collecting all messages pushed by the third-party service interface through the subscription message system; the message at least comprises a request head, request parameters and a return result;
step S20, the subscription message system monitors the collected messages and generates monitoring results;
step S30, the subscription message system stores the monitoring result to the index back end for analysis, and the index back end is preferably solr or elastic search.
The step S10 specifically includes: the back end calls a third-party service interface to push the first message to a subscription message system; and the front end calls a third-party service interface to push the second message to the subscription message system.
The first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information.
The step S20 specifically includes:
step S21, creating a time threshold, a message monitoring type and an interface status label; the time threshold and the time threshold can be adjusted according to actual requirements;
step S22, judging whether the type of the collected message is matched with the message monitoring type, if yes, entering step S23; if not, ending the flow;
step S23, judging the service state through the service access result information, and if the service is normal, entering step S24; if the service is abnormal, ending the process; by not analyzing the abnormal request when the service is abnormal, the pressure on the interface and the page of the third-party service is reduced, and the resource occupied by monitoring is reduced.
Step S24, judging the state of the third-party service interface through the page return result, and if the state of the third-party service interface is normal, entering step S25; if the state of the third-party service interface is abnormal, the step S26 is entered; by analyzing the interface state of the third-party service when the service is normal, whether the interface state is intermittent abnormal or not can be conveniently mastered.
Step S25, adding one to the number of times of normal state, and judging whether the number of times of normal state is larger than or equal to a number threshold, if so, setting the interface state label as continuously available, and entering step S30; if yes, go to step S22;
step S26, judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is larger than a time threshold, if so, clearing the times of normal state, and entering step S22; if the number of state anomalies is less than the predetermined value, the number of state anomalies is increased by one, the interface state flag is set to be intermittently available, and the process proceeds to step S30.
The step S30 specifically includes: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface. By storing the interface state label and the information triggering the abnormal state of the third-party service interface to the rear end of the index, the abnormal information can be counted and analyzed.
The invention discloses a preferred embodiment of a service monitoring system, which comprises the following modules:
the message collection module is used for collecting all messages pushed by the third-party service interface through the subscription message system; the message at least comprises a request head, request parameters and a return result;
the message monitoring module is used for monitoring the collected messages by the subscription message system and generating a monitoring result;
and the monitoring result storage module is used for storing the monitoring result to an index rear end for analysis by the subscription message system, wherein the index rear end is preferably solr or elastic search.
The message collection module is specifically as follows: the back end calls a third-party service interface to push the first message to a subscription message system; and the front end calls a third-party service interface to push the second message to the subscription message system.
The first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information.
The message monitoring module specifically comprises:
the device comprises a parameter establishing unit, a parameter monitoring unit and a parameter monitoring unit, wherein the parameter establishing unit is used for establishing a time threshold, a message monitoring type and an interface state label; the time threshold and the time threshold can be adjusted according to actual requirements;
the type matching unit is used for judging whether the type of the collected message is matched with the message monitoring type, if so, the service state judging unit is started; if not, ending the flow;
the service state judging unit is used for judging the state of the service according to the service access result information, and if the service is normal, the service enters the interface state judging unit; if the service is abnormal, ending the process; by not analyzing the abnormal request when the service is abnormal, the pressure on the interface and the page of the third-party service is reduced, and the resource occupied by monitoring is reduced.
The interface state judging unit is used for judging the state of the third-party service interface according to the page return result, and if the state of the third-party service interface is normal, the interface state judging unit enters a state normal frequency setting unit; if the state of the third-party service interface is abnormal, entering a state abnormal frequency setting unit; by analyzing the interface state of the third-party service when the service is normal, whether the interface state is intermittent abnormal or not can be conveniently mastered.
The system comprises a state normal frequency setting unit, a monitoring result storage module and a data processing module, wherein the state normal frequency setting unit is used for adding one to the normal frequency of the state and judging whether the normal frequency is greater than or equal to a frequency threshold value, if so, the interface state label is set to be continuously available and enters the monitoring result storage module; if the number is less than the preset number, entering a type matching unit;
the abnormal state frequency setting unit is used for judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is greater than a time threshold value or not, if so, resetting the normal state frequency and entering the type matching unit; and if the number of the state abnormity is less than the preset value, adding one to the number of the state abnormity, setting the interface state label as available intermittently, and entering a monitoring result storage module.
The monitoring result storage module specifically comprises: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface. By storing the interface state label and the information triggering the abnormal state of the third-party service interface to the rear end of the index, the abnormal information can be counted and analyzed.
In summary, the invention has the advantages that:
1. by not analyzing the abnormal request when the service is abnormal, the pressure on the interface and the page of the third-party service is reduced, and the resource occupied by monitoring is reduced.
2. By storing the interface state label and the information triggering the abnormal state of the third-party service interface to the rear end of the index, the abnormal information can be counted and analyzed.
3. By analyzing the interface state of the third-party service when the service is normal, whether the interface state is intermittent abnormal or not can be conveniently mastered.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.
Claims (2)
1. A method of service monitoring, characterized by: the method comprises the following steps:
step S10, collecting all messages pushed by the third-party service interface through the subscription message system;
step S20, the subscription message system monitors the collected messages and generates monitoring results;
step S30, the subscription message system stores the monitoring result to the index back end for analysis;
the back end calls a third-party service interface to push the first message to a subscription message system; the front end calls a third-party service interface to push the second message to a subscription message system;
the first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information;
the step S20 specifically includes:
step S21, creating a time threshold, a message monitoring type and an interface status label;
step S22, judging whether the type of the collected message is matched with the message monitoring type, if yes, entering step S23; if not, ending the flow;
step S23, judging the service state through the service access result information, and if the service is normal, entering step S24; if the service is abnormal, ending the process;
step S24, judging the state of the third-party service interface through the page return result, and if the state of the third-party service interface is normal, entering step S25; if the state of the third-party service interface is abnormal, the step S26 is entered;
step S25, adding one to the number of times of normal state, and judging whether the number of times of normal state is larger than or equal to a number threshold, if so, setting the interface state label as continuously available, and entering step S30; if yes, go to step S22;
step S26, judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is larger than a time threshold, if so, clearing the times of normal state, and entering step S22; if the number of the state exception is less than the preset value, adding one to the number of the state exception, setting the interface state label as available intermittently, and entering the step S30;
the step S30 specifically includes: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface.
2. A service monitoring system, characterized by: the system comprises the following modules:
the message collection module is used for collecting all messages pushed by the third-party service interface through the subscription message system;
the message monitoring module is used for monitoring the collected messages by the subscription message system and generating a monitoring result;
the monitoring result storage module is used for storing the monitoring result to the index back end for analysis by the subscription message system;
the message collection module is specifically as follows: the back end calls a third-party service interface to push the first message to a subscription message system; the front end calls a third-party service interface to push the second message to a subscription message system;
the first message comprises an interface request and service access result information; the second message comprises a page return result and page access path information;
the message monitoring module specifically comprises:
the device comprises a parameter establishing unit, a parameter monitoring unit and a parameter monitoring unit, wherein the parameter establishing unit is used for establishing a time threshold, a message monitoring type and an interface state label;
the type matching unit is used for judging whether the type of the collected message is matched with the message monitoring type, if so, the service state judging unit is started; if not, ending the flow;
the service state judging unit is used for judging the state of the service according to the service access result information, and if the service is normal, the service enters the interface state judging unit; if the service is abnormal, ending the process;
the interface state judging unit is used for judging the state of the third-party service interface according to the page return result, and if the state of the third-party service interface is normal, the interface state judging unit enters a state normal frequency setting unit; if the state of the third-party service interface is abnormal, entering a state abnormal frequency setting unit;
the system comprises a state normal frequency setting unit, a monitoring result storage module and a data processing module, wherein the state normal frequency setting unit is used for adding one to the normal frequency of the state and judging whether the normal frequency is greater than or equal to a frequency threshold value, if so, the interface state label is set to be continuously available and enters the monitoring result storage module; if the number is less than the preset number, entering a type matching unit;
the abnormal state frequency setting unit is used for judging whether the difference between the time when the interface state is abnormal and the last normal time of the interface state is greater than a time threshold value or not, if so, resetting the normal state frequency and entering the type matching unit; if the number of the state abnormity is less than the preset value, adding one to the number of the state abnormity, setting the interface state label as available intermittently, and entering a monitoring result storage module;
the monitoring result storage module specifically comprises: and the message subscription system stores the interface state label and the message triggering the state abnormity of the third-party service interface to the index back end for analysis, and provides a detailed list for inquiring the interface request triggering the state abnormity of the third-party service interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910496523.2A CN110225113B (en) | 2019-06-10 | 2019-06-10 | Service monitoring method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910496523.2A CN110225113B (en) | 2019-06-10 | 2019-06-10 | Service monitoring method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110225113A CN110225113A (en) | 2019-09-10 |
CN110225113B true CN110225113B (en) | 2021-11-09 |
Family
ID=67815952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910496523.2A Active CN110225113B (en) | 2019-06-10 | 2019-06-10 | Service monitoring method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110225113B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110737461B (en) * | 2019-09-30 | 2023-07-28 | 天津大学 | Third party service access method based on cross-border endowment platform |
CN113342606A (en) * | 2021-06-07 | 2021-09-03 | 平安证券股份有限公司 | Data monitoring method, device, equipment and storage medium based on message middleware |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104158881A (en) * | 2014-08-20 | 2014-11-19 | 哈尔滨工程大学 | System and method of third-party cloud security monitoring supporting user customization |
CN104410550A (en) * | 2014-12-10 | 2015-03-11 | 深圳中兴网信科技有限公司 | Web service monitoring method and web service monitoring device |
CN107659431A (en) * | 2017-08-15 | 2018-02-02 | 北京趣拿软件科技有限公司 | Interface processing method, apparatus, storage medium and processor |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170004263A1 (en) * | 2015-07-02 | 2017-01-05 | Think Anew LLC | Method, system and application for monitoring key performance indicators and providing push notifications and survey status alerts |
CN107229527B (en) * | 2017-05-25 | 2022-03-01 | 北京小米移动软件有限公司 | Information resource collection method and device and computer readable storage medium |
-
2019
- 2019-06-10 CN CN201910496523.2A patent/CN110225113B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104158881A (en) * | 2014-08-20 | 2014-11-19 | 哈尔滨工程大学 | System and method of third-party cloud security monitoring supporting user customization |
CN104410550A (en) * | 2014-12-10 | 2015-03-11 | 深圳中兴网信科技有限公司 | Web service monitoring method and web service monitoring device |
CN107659431A (en) * | 2017-08-15 | 2018-02-02 | 北京趣拿软件科技有限公司 | Interface processing method, apparatus, storage medium and processor |
Non-Patent Citations (1)
Title |
---|
基于发布订阅的分布式监控主动消息交互研究;屈志坚;《计算机测量与控制》;20150323;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110225113A (en) | 2019-09-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20180365085A1 (en) | Method and apparatus for monitoring client applications | |
US10904112B2 (en) | Automatic capture of detailed analysis information based on remote server analysis | |
CN107370806B (en) | HTTP status code monitoring method, device, storage medium and electronic equipment | |
CN110661659A (en) | Alarm method, device and system and electronic equipment | |
CN107204875B (en) | Data reporting link monitoring method and device, electronic equipment and storage medium | |
CN105207806A (en) | Monitoring method and apparatus of distributed service | |
CN110225113B (en) | Service monitoring method and system | |
CN111367760B (en) | Log collection method and device, computer equipment and storage medium | |
CN104426947A (en) | Terminal intelligent updating method and system, terminal and data updating server | |
CN112069049A (en) | Data monitoring management method and device, server and readable storage medium | |
CN110941530B (en) | Method, device, computer equipment and storage medium for acquiring monitoring data | |
CN111782486A (en) | Alarm implementation method and system based on dynamic configuration | |
CN111782431A (en) | Exception processing method, exception processing device, terminal and storage medium | |
WO2015187001A2 (en) | System and method for managing resources failure using fast cause and effect analysis in a cloud computing system | |
CN112256548B (en) | Abnormal data monitoring method and device, server and storage medium | |
CN112148508B (en) | Information processing method and related device | |
CN115914064A (en) | Network system service performance evaluation method, device, computing equipment and storage medium | |
CN110011845B (en) | Log collection method and system | |
CN108829563B (en) | Alarm method and alarm device | |
CN116860552A (en) | Application program operation monitoring method and device, electronic equipment and storage medium | |
CN112286778B (en) | Service chain call analysis method and device | |
CN112463343B (en) | Restarting method and device of business process, storage medium and electronic equipment | |
CN112702227B (en) | Heartbeat event detection method, device, equipment and computer readable storage medium | |
CN113934744A (en) | Data sharing method and device | |
CN112134760A (en) | Link state monitoring method, device, equipment and computer readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |