CN117555747A - Service bus monitoring method and system - Google Patents

Service bus monitoring method and system Download PDF

Info

Publication number
CN117555747A
CN117555747A CN202311245260.0A CN202311245260A CN117555747A CN 117555747 A CN117555747 A CN 117555747A CN 202311245260 A CN202311245260 A CN 202311245260A CN 117555747 A CN117555747 A CN 117555747A
Authority
CN
China
Prior art keywords
service
message
call
service call
queue
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
CN202311245260.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.)
Fujian Ecan Information Technology Co ltd
Original Assignee
Fujian Ecan Information Technology 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 Fujian Ecan Information Technology Co ltd filed Critical Fujian Ecan Information Technology Co ltd
Priority to CN202311245260.0A priority Critical patent/CN117555747A/en
Publication of CN117555747A publication Critical patent/CN117555747A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a service bus monitoring method and a system in the technical field of computers, wherein the method comprises the following steps: s10, creating an MQ queue, and receiving a service bus call message distributed by a management system through the MQ queue; step S20, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, and displaying the service call log through a visual interface; step S30, storing the service call log into an elastic search in real time, and storing the service call result into MySQL in real time; step S40, carrying out compensation pushing on the message based on the calling state; and S50, performing problem positioning through the elastic search and MySQL. The invention has the advantages that: the reliability of service bus service call and the convenience of operation and maintenance are greatly improved.

Description

Service bus monitoring method and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service bus monitoring method and system.
Background
The service bus is a bottom communication technology required for realizing data exchange through shielding, is a transmission tool for realizing application request information and response result information, and is widely applied to various management systems (integrated platforms), such as hospital management systems. When each management system applies a service bus, the requirement of visual monitoring management on service call of the service bus exists; for example, in the call flow of the service, monitoring and management are performed on request push, message conversion processing, request pop, compensation call after call failure, call result statistical analysis and the like.
However, when the conventional service bus is applied, the service call process and the stack access information of each node cannot be clearly displayed, the failed call request cannot be subjected to compensation call (the failed message cannot be subjected to compensation pushing), that is, the whole service call flow cannot be monitored and managed, the problem cannot be fully exposed, and the management level of the management system cannot be accurately improved by solving the problem.
Therefore, how to provide a service bus monitoring method and system, to improve the reliability of service call and the convenience of operation and maintenance of the service bus, is a technical problem to be solved.
Disclosure of Invention
The invention aims to solve the technical problem of providing a service bus monitoring method and a service bus monitoring system, which are used for improving the service call reliability and the operation and maintenance convenience of the service bus.
In a first aspect, the present invention provides a service bus monitoring method, including the steps of:
s10, creating an MQ queue, and receiving a service bus call message distributed by a management system through the MQ queue;
step S20, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, and displaying the service call log through a visual interface;
step S30, storing the service call log into an elastic search in real time, and storing the service call result into MySQL in real time;
step S40, carrying out compensation pushing on the message based on the calling state;
and S50, performing problem positioning through the elastic search and MySQL.
Further, the step S10 specifically includes:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue.
Further, in step S20, the service call log includes at least a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in the service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
Further, the step S40 specifically includes:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
Further, the step S50 specifically includes:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
In a second aspect, the present invention provides a service bus monitoring system, including:
the MQ queue creation module is used for creating an MQ queue, and receiving a service bus call message distributed by the management system through the MQ queue;
the MQ queue monitoring module is used for monitoring the message consumed by the MQ queue, recording a service call log, checking the call state and counting the service call result based on the message, and displaying the service call log through a visual interface;
the call log and result storage module is used for storing the service call log into an elastic search in real time and storing the service call result into MySQL in real time;
the message compensation module is used for carrying out compensation pushing on the message based on the calling state;
and the problem positioning module is used for positioning the problem through the elastic search and MySQL.
Further, the MQ queue creating module is specifically configured to:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue.
Further, in the MQ queue monitoring module, the service call log at least includes a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in the service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
Further, the message compensation module is specifically configured to:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
Further, the problem location module is specifically configured to:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
The invention has the advantages that:
receiving a message called by a service bus distributed by a management system through the created MQ queue, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, displaying the service call log through a visual interface, storing the service call log into an elastic search in real time, storing the service call result into MySQL in real time, compensating and pushing the message based on the call state, and positioning the problem through the elastic search and MySQL; the service call log is recorded by monitoring the message consumed by the MQ queue, and the service call log is displayed through a visual interface, so that the service call process and the stack access information of each node can be intuitively known; by checking the calling state of the message, when the message is failed to be called, the message is compensated and pushed in a compensation mode of automatic compensation, manual single compensation or manual batch compensation, so that the reliability of message pushing is ensured, and a service system is not required to be modified; by storing the service call log to the elastic search, the positioning information can be quickly retrieved, the time spent for calling the log, the error node and the message sent to the stack can be checked through the call stack, the problem of failure in transmission can be quickly positioned, the service call result is stored to MySQL, the problem can be quickly transmitted and optimized through the statistics of the MySQL query service call result, and finally the reliability of service bus service call and the convenience of operation and maintenance are greatly improved.
Drawings
The invention will be further described with reference to examples of embodiments with reference to the accompanying drawings.
Fig. 1 is a flow chart of a service bus monitoring method of the present invention.
Fig. 2 is a schematic structural diagram of a service bus monitoring system according to the present invention.
Fig. 3 is a schematic flow chart of the present invention.
Detailed Description
According to the technical scheme in the embodiment of the application, the overall thought is as follows: the service call log is recorded by monitoring the message consumed by the MQ queue, and the service call log is displayed through a visual interface, so that the service call process and the stack access information of each node can be intuitively known; by checking the calling state of the message, when the message is failed to be called, the message is compensated and pushed in a compensation mode of automatic compensation, manual single compensation or manual batch compensation, so that the reliability of message pushing is ensured, and the reliability of service bus service calling is further improved; by storing the service call log to the elastic search, the positioning information can be quickly retrieved, the time spent for log call, the error node and the message sent to the stack can be checked through the call stack, the problem of failure in transmission can be quickly positioned, the service call result is stored to MySQL, the problem can be quickly transmitted and optimized through the statistics of the MySQL query service call result, and the convenience of operation and maintenance is further improved.
Referring to fig. 1 to 3, a preferred embodiment of a service bus monitoring method of the present invention includes the following steps:
s10, creating an MQ queue, and receiving a service bus call message distributed by a management system through the MQ queue;
step S20, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, and displaying the service call log through a visual interface;
because the request message processing configuration corresponding to different services is different, different request messages can be put into a stack and the flow trend of the request messages is different, so that the service call log is necessarily displayed;
step S30, storing the service call log into an elastic search in real time, and storing the service call result into MySQL in real time;
after analysis and statistics are carried out on the service call log and the service call result, the service call log and the service call result need to be stored in a floor mode, and data (the service call log and the service call result) needs to be stored for at least one year every day due to quite large interaction amount, so that the speed and the accuracy of data retrieval are ensured, and the service call log and the service call result are stored in two modes (elastic search and MySQL); the service call log is stored in different indexes of the elastic search in month units so as to be quickly searched, and the service call result is stored in MySQL, so that contents with different requirements can be displayed through SQL sentences.
Step S40, carrying out compensation pushing on the message based on the calling state;
and S50, performing problem positioning through the elastic search and MySQL.
The invention can assist the management system to carry out the compensation pushing of the failure message on the basis of zero transformation of the service system, and the service bus is expanded because the service bus does not have the function, so that the service bus can push the message again without passing through the service system; because the original service bus has no function of showing service call logs, the invention introduces the elastic search, not only can rapidly retrieve positioning information, but also can check the time spent by log call through a call stack, and the error node and the stack access message help to rapidly locate the problem of sending failure; by counting the service calling result, the service and the endpoint with abnormal response for many times can be found out clearly and quickly, for example, the calling time is too long, the service with excessive calling failure times is used for finding out problems and optimizing, and therefore the convenience of operation and maintenance is improved.
The step S10 specifically includes:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue. The monitoring management of the service bus is realized by expanding an expansion interface of the service bus based on the service bus.
In the step S20, the service call log includes at least a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in the service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
The step S40 specifically includes:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
After the service bus consumes the message from the MQ queue, the execution result of the current message is checked, and when the service message is called, the downstream endpoint is abnormal or the network is not communicated, the service call abnormality can occur, and the message compensation is carried out for the situation; when screening the message, the message can be processed by time, calling system, success and failure, receiving endpoint, etc.
The step S50 specifically includes:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
The preferred embodiment of the service bus monitoring system of the present invention comprises the following modules:
the MQ queue creation module is used for creating an MQ queue, and receiving a service bus call message distributed by the management system through the MQ queue;
the MQ queue monitoring module is used for monitoring the message consumed by the MQ queue, recording a service call log, checking the call state and counting the service call result based on the message, and displaying the service call log through a visual interface;
because the request message processing configuration corresponding to different services is different, different request messages can be put into a stack and the flow trend of the request messages is different, so that the service call log is necessarily displayed;
the call log and result storage module is used for storing the service call log into an elastic search in real time and storing the service call result into MySQL in real time;
after analysis and statistics are carried out on the service call log and the service call result, the service call log and the service call result need to be stored in a floor mode, and data (the service call log and the service call result) needs to be stored for at least one year every day due to quite large interaction amount, so that the speed and the accuracy of data retrieval are ensured, and the service call log and the service call result are stored in two modes (elastic search and MySQL); the service call log is stored in different indexes of the elastic search in month units so as to be quickly searched, and the service call result is stored in MySQL, so that contents with different requirements can be displayed through SQL sentences.
The message compensation module is used for carrying out compensation pushing on the message based on the calling state;
and the problem positioning module is used for positioning the problem through the elastic search and MySQL.
The invention can assist the management system to carry out the compensation pushing of the failure message on the basis of zero transformation of the service system, and the service bus is expanded because the service bus does not have the function, so that the service bus can push the message again without passing through the service system; because the original service bus has no function of showing service call logs, the invention introduces the elastic search, not only can rapidly retrieve positioning information, but also can check the time spent by log call through a call stack, and the error node and the stack access message help to rapidly locate the problem of sending failure; by counting the service calling result, the service and the endpoint with abnormal response for many times can be found out clearly and quickly, for example, the calling time is too long, the service with excessive calling failure times is used for finding out problems and optimizing, and therefore the convenience of operation and maintenance is improved.
The MQ queue creation module is specifically configured to:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue. The monitoring management of the service bus is realized by expanding an expansion interface of the service bus based on the service bus.
In the MQ queue monitoring module, the service call log at least comprises a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in a service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
The message compensation module is specifically configured to:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
After the service bus consumes the message from the MQ queue, the execution result of the current message is checked, and when the service message is called, the downstream endpoint is abnormal or the network is not communicated, the service call abnormality can occur, and the message compensation is carried out for the situation; when screening the message, the message can be processed by time, calling system, success and failure, receiving endpoint, etc.
The problem positioning module is specifically used for:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
In summary, the invention has the advantages that:
receiving a message called by a service bus distributed by a management system through the created MQ queue, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, displaying the service call log through a visual interface, storing the service call log into an elastic search in real time, storing the service call result into MySQL in real time, compensating and pushing the message based on the call state, and positioning the problem through the elastic search and MySQL; the service call log is recorded by monitoring the message consumed by the MQ queue, and the service call log is displayed through a visual interface, so that the service call process and the stack access information of each node can be intuitively known; by checking the calling state of the message, when the message is failed to be called, the message is compensated and pushed in a compensation mode of automatic compensation, manual single compensation or manual batch compensation, so that the reliability of message pushing is ensured, and a service system is not required to be modified; by storing the service call log to the elastic search, the positioning information can be quickly retrieved, the time spent for calling the log, the error node and the message sent to the stack can be checked through the call stack, the problem of failure in transmission can be quickly positioned, the service call result is stored to MySQL, the problem can be quickly transmitted and optimized through the statistics of the MySQL query service call result, and finally the reliability of service bus service call and the convenience of operation and maintenance are greatly improved.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that the specific embodiments described are illustrative only and not intended to limit the scope of the invention, and that equivalent modifications and variations of the invention in light of the spirit of the invention will be covered by the claims of the present invention.

Claims (10)

1. A service bus monitoring method is characterized in that: the method comprises the following steps:
s10, creating an MQ queue, and receiving a service bus call message distributed by a management system through the MQ queue;
step S20, monitoring the message consumed by the MQ queue, recording a service call log, checking a call state and counting a service call result based on the message, and displaying the service call log through a visual interface;
step S30, storing the service call log into an elastic search in real time, and storing the service call result into MySQL in real time;
step S40, carrying out compensation pushing on the message based on the calling state;
and S50, performing problem positioning through the elastic search and MySQL.
2. A service bus monitoring method as claimed in claim 1, characterized in that: the step S10 specifically includes:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue.
3. A service bus monitoring method as claimed in claim 1, characterized in that: in the step S20, the service call log includes at least a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in the service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
4. A service bus monitoring method as claimed in claim 1, characterized in that: the step S40 specifically includes:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
5. A service bus monitoring method as claimed in claim 1, characterized in that: the step S50 specifically includes:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
6. A service bus monitoring system, characterized by: the device comprises the following modules:
the MQ queue creation module is used for creating an MQ queue, and receiving a service bus call message distributed by the management system through the MQ queue;
the MQ queue monitoring module is used for monitoring the message consumed by the MQ queue, recording a service call log, checking the call state and counting the service call result based on the message, and displaying the service call log through a visual interface;
the call log and result storage module is used for storing the service call log into an elastic search in real time and storing the service call result into MySQL in real time;
the message compensation module is used for carrying out compensation pushing on the message based on the calling state;
and the problem positioning module is used for positioning the problem through the elastic search and MySQL.
7. A service bus monitoring system as set forth in claim 6 wherein: the MQ queue creation module is specifically configured to:
an MQ queue is created based on an expansion interface of the service bus, and the message of the service bus call distributed by the management system is received asynchronously through the MQ queue.
8. A service bus monitoring system as set forth in claim 6 wherein: in the MQ queue monitoring module, the service call log at least comprises a push message and a push message of the whole service, a push message and a push message sent to each downstream endpoint, and a media flow trend of a request message in a service bus; the media flow trend at least comprises the storage state of the request message in the storage media, the flow direction in each storage media and the time spent by storing the request message in each storage media;
the calling state is successful or failed;
the service call result at least comprises service call success times, service call failure times, interface call success times, interface call failure times, response time, service call time and interface call time.
9. A service bus monitoring system as set forth in claim 6 wherein: the message compensation module is specifically configured to:
and acquiring a message of call failure based on the call state, screening the message to be compensated based on the received screening condition, performing compensation pushing on the screened message in an automatic compensation mode, a manual single compensation mode or a manual batch compensation mode, and displaying a compensation result, compensation time period and compensation progress in real time through a visual interface.
10. A service bus monitoring system as set forth in claim 6 wherein: the problem positioning module is specifically used for:
and searching a service call log of a set time period through the elastic search, inquiring a service call result from MySQL according to need through an SQL statement, and positioning the problem based on the service call log and the service call result.
CN202311245260.0A 2023-09-26 2023-09-26 Service bus monitoring method and system Pending CN117555747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311245260.0A CN117555747A (en) 2023-09-26 2023-09-26 Service bus monitoring method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311245260.0A CN117555747A (en) 2023-09-26 2023-09-26 Service bus monitoring method and system

Publications (1)

Publication Number Publication Date
CN117555747A true CN117555747A (en) 2024-02-13

Family

ID=89817404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311245260.0A Pending CN117555747A (en) 2023-09-26 2023-09-26 Service bus monitoring method and system

Country Status (1)

Country Link
CN (1) CN117555747A (en)

Similar Documents

Publication Publication Date Title
US7509539B1 (en) Method for determining correlation of synchronized event logs corresponding to abnormal program termination
CN110162512B (en) Log retrieval method, device and storage medium
CN110650036A (en) Alarm processing method and device and electronic equipment
US20090070455A1 (en) Apparatus, system, and method for visual log analysis
CN111339175B (en) Data processing method, device, electronic equipment and readable storage medium
CN111385148A (en) Service alarm method, device, computer equipment and storage medium
US20070005542A1 (en) Apparatus, system, and method for regulating error reporting
CN111611094A (en) Monitoring and managing method for abnormal MQ information
CN112486719A (en) Method and equipment for RPC interface call failure processing
CN110717130B (en) Dotting method, dotting device, dotting terminal and storage medium
CN113098715B (en) Information processing method, device, system, medium and computing equipment
US20060129649A1 (en) Server availability reporting using asynchronous e-mail message
CN117555747A (en) Service bus monitoring method and system
CN111966653A (en) Data processing method, device, server and storage medium for micro-service call link
CN109254880B (en) Method and device for processing database downtime
US7475076B1 (en) Method and apparatus for providing remote alert reporting for managed resources
CN112104480B (en) Method and system for improving alarm quality
US20060078006A1 (en) Data transmission process
CN112631929A (en) Test case generation method and device, storage medium and electronic equipment
CN112737812B (en) Data transmission method and device
CN109800425B (en) Semantic miss automatic error correction processing method and system for cross-platform information exchange
US20220350692A1 (en) Exception management in heterogenous computing environment
CN116561102A (en) Data bidirectional migration method, device, equipment, medium and program product
CN117290123A (en) Data monitoring processing method, device, equipment and storage medium
CN117349383A (en) Data synchronization method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication