CN111124830B - Micro-service monitoring method and device - Google Patents
Micro-service monitoring method and device Download PDFInfo
- Publication number
- CN111124830B CN111124830B CN201911343029.9A CN201911343029A CN111124830B CN 111124830 B CN111124830 B CN 111124830B CN 201911343029 A CN201911343029 A CN 201911343029A CN 111124830 B CN111124830 B CN 111124830B
- Authority
- CN
- China
- Prior art keywords
- target
- message queue
- data
- sending
- monitoring
- 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
- 238000012544 monitoring process Methods 0.000 title claims abstract description 84
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000000007 visual effect Effects 0.000 claims abstract description 14
- 230000002159 abnormal effect Effects 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 5
- 238000012806 monitoring device Methods 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 10
- 238000012800 visualization Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 229920001971 elastomer Polymers 0.000 description 2
- 239000000806 elastomer Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000000889 atomisation Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/1734—Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
- G06F16/1827—Management specifically adapted to NAS
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Library & Information Science (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a device for monitoring micro-services, wherein the method for monitoring the micro-services comprises the following steps: acquiring target log files which are automatically output to the NAS directory by all target application services; analyzing the target log file, and sending the target log data extracted after analyzing the target log file to a target message queue; monitoring target log data in a target message queue, and judging whether the target log data in the target message queue accords with a first preset index; if not, the information that the target log data does not accord with the first preset index is sent to the appointed address. The invention can monitor the micro-service in a multi-dimension way and can provide a visual query interface.
Description
Technical Field
The present invention relates to the field of monitoring application technologies, and in particular, to a method and an apparatus for monitoring a micro service.
Background
The traditional micro-service monitoring method is layered monitoring, and common layering can be divided into a user side layer, a service layer, an application layer, a system layer and a machine room layer, and different monitoring methods are used for different layers. Traditional monitoring software zabbix (an enterprise-level open source solution based on WEB interfaces that provides distributed system monitoring and network monitoring functions) is relatively common, however, the configuration of zabbix is relatively complex and the machine is relatively single as the monitoring dimension. Most of the current software industries use a micro-service technology architecture to perform atomization splitting on service functions to form independent applications to run. The most obvious change from traditional monitoring is to change the monitoring hierarchy and machine as a central view to a service as a central view. Micro-service monitoring can be divided into index monitoring, log monitoring and link monitoring at present, and the open source community also has corresponding solutions, for example, index monitoring has promethues (open source monitoring system), log monitoring has ELK (log analysis system), and link monitoring has zip. The micro-service technical architecture adopts a multi-service multi-application mode, the traditional monitoring method has single monitoring dimension, the traditional micro-service architecture concept cannot be applied, the traditional micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring and visualization, and cannot monitor micro-services in multiple dimensions, so that a plurality of inconveniences are brought to the work of developers and operation and maintenance personnel, the work efficiency is influenced, and the system faults cannot be effectively solved in time.
Disclosure of Invention
The embodiment of the invention provides a method and a device for monitoring micro services, which are used for solving the following problems in the prior art: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
In order to solve the technical problems, a first technical scheme adopted by the embodiment of the invention is as follows:
a method of monitoring a micro-service, comprising: acquiring target log files which are automatically output to the NAS directory by all target application services; analyzing the target log file, and sending the target log data extracted after analyzing the target log file to a target message queue; monitoring the target log data in the target message queue, and judging whether the target log data in the target message queue accords with a first preset index; if not, the information that the target log data does not accord with the first preset index is sent to a designated address.
Optionally, after the obtaining the target log files of all the target application services output to the NAS directory, the method further includes: acquiring node index data and container index data of a target server cluster, and transmitting the node index data and the container index data to the target message queue; monitoring the node index data and the container index data in the target message queue, and judging whether the node index data and/or the container index data in the target message queue meet a second preset index; if not, the node index data and/or the container index data in the target message queue are/is not matched with the information of the second preset index, and the information is sent to the appointed address.
Optionally, after the sending the information that the target log data does not meet the first preset index to the designated address, the method includes: and generating a visual first view interface according to the monitoring result of the target log data in the target message queue, and sending the first view interface to the appointed address.
Optionally, after the sending the information that the node index data and/or the container index data in the target message queue do not meet the second preset index to the specified address, the method includes: and generating a visual second view interface according to monitoring results of the node index data and the container index data in the target message queue, and sending the second view interface to the appointed address.
Optionally, the acquiring the target log file of all the target application services output to the NAS directory by itself further includes: performing heartbeat detection on all the target application services, and judging whether the target application services in abnormal states exist or not; if yes, sending the information of the target application service with the abnormal state to the appointed address, or generating a visual third view interface from the information of the target application service with the abnormal state, and sending the third view interface to the appointed address.
Optionally, after the sending the information of the target application service with the abnormal state to the specified address or generating the visualized third view interface with the information of the target application service with the abnormal state, sending the third view interface to the specified address, the method further includes: and sending the information of the target application service with the abnormal state to a search server, or sending the third view interface to the search server.
Optionally, after the obtaining the target log files of all the target application services output to the NAS directory, the method further includes: and sending all the target log files output to the NAS directory to a distributed file system server for storage and backup.
In order to solve the technical problems, a second technical scheme adopted by the embodiment of the invention is as follows:
a micro-service monitoring device, comprising: the file acquisition module is used for acquiring target log files which are automatically output to the NAS catalog by all target application services; the analysis uploading module is used for analyzing the target log file and sending the target log data extracted after analyzing the target log file to a target message queue; the monitoring judging module is used for monitoring the target log data in the target message queue and judging whether the target log data in the target message queue accords with a first preset index or not; and the information sending module is used for sending the information that the target log data does not accord with the first preset index to a designated address when the target log data in the target message queue does not accord with the first preset index.
In order to solve the above technical problems, a third technical solution adopted in the embodiment of the present invention is as follows:
a computer readable storage medium having stored thereon a computer program which when executed implements a method of monitoring a micro-service as described above.
In order to solve the above technical problems, a fourth technical solution adopted in the embodiment of the present invention is as follows:
a computer device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing a method of monitoring a micro-service as described above when executing the computer program.
The embodiment of the invention has the beneficial effects that: different from the situation in the prior art, the embodiment of the invention obtains the target log files which are automatically output to the NAS catalog by all target application services, analyzes the target log, sends the analyzed target log data to the target message queue, monitors the target log data in the target message queue, judges whether the target log data in the target message queue accords with the first preset index, if not, sends the information that the target log data does not accord with the first preset index to the appointed address, and solves the following problems in the prior art: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
Drawings
FIG. 1 is a flow chart illustrating an implementation of a method for monitoring a micro-service according to an embodiment of the present invention;
FIG. 2 is a partial structural frame diagram of an embodiment of a micro-service monitoring device according to a second embodiment of the present invention;
FIG. 3 is a partial structural framework of an implementation of a computer readable storage medium according to a third embodiment of the present invention;
FIG. 4 is a partial structural frame diagram of an implementation of a computer device according to a fourth embodiment of the present invention.
Detailed Description
Example 1
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of a method for monitoring a micro service according to an embodiment of the present invention, and may be obtained with reference to fig. 1, where the method for monitoring a micro service includes:
step S101: and acquiring target log files which are automatically output to the NAS directory by all the target application services. All target application services are packaged into a docker mirror image and deployed in a K8S cluster, wherein K8S is Kubernetes and is a container cluster management system of Google open source. The target log comprises a service measurement log file, a service error log file, a daily output log file, a service response log file and a service http request log file, all log file configuration rules generate new files when the configuration rules exceed preset values such as 10M, and the new files are appointed to be output to a shared NAS path and uploaded to an Arin cloud distributed file system OSS.
Among them, NAS (Network Attached Storage ), i.e., a device connected to a network and having a data storage function, is also called "network storage", which is a dedicated data storage server. The method takes data as a center, thoroughly separates the storage equipment from the server, and centrally manages the data, thereby releasing bandwidth, improving performance, reducing total ownership cost and protecting investment. Its cost is far lower than using server storage, while its efficiency is far higher than the latter.
Step S102: analyzing the target log file, and sending the target log data extracted after analyzing the target log file to a target message queue. Wherein the message queue is selected as Kafka, which is a high-throughput distributed publish-subscribe message system that can process all action flow data of users in websites. Wherein in this step, the log is optionally parsed with a logstack tool and output to the message queue Kafka. Wherein each message of Kafka has a corresponding type, each type being sent to a different set.
Step S103: monitoring the target log data in the target message queue, and judging whether the target log data in the target message queue accords with a first preset index.
Step S104: and when the target log data in the target message queue does not accord with a first preset index, sending the information that the target log data does not accord with the first preset index to a designated address.
Step S105: and when the target log in the target message queue accords with a first preset index, not sending the information that the target log data does not accord with the first preset index to a designated address.
In this embodiment, optionally, after the obtaining the target log file of the NAS directory from the target application service, the method further includes:
first, node index data and container index data of a target server cluster (i.e., kubernetes) are acquired, and the node index data and the container index data are sent to the target message queue.
Second, monitor the node index data and the container index data in the target message queue, and determine whether the node index data and/or the container index data in the target message queue meet a second preset index.
Thirdly, when the node index data and/or the container index data in the target message queue do not meet a second preset index, sending the information that the node index data and/or the container index data in the target message queue do not meet the second preset index to the appointed address.
In this embodiment, optionally, after sending the information that the target log data does not meet the first preset index to the specified address, the method includes:
and generating a visual first view interface according to the monitoring result of the target log data in the target message queue, and sending the first view interface to the appointed address. In this embodiment, the data is queried through an elastic search (enterprise-level search engine), so as to provide a visual view of various monitoring indexes.
In this embodiment, optionally, after sending the information that the node index data and/or the container index data in the target message queue do not meet the second preset index to the specified address, the method includes:
and generating a visual second view interface according to monitoring results of the node index data and the container index data in the target message queue, and sending the second view interface to the appointed address.
In this embodiment, optionally, while the obtaining the target log file of all target application services output to the NAS directory by itself, the method further includes:
first, heartbeat detection is performed on all the target application services, and whether the target application services in abnormal states exist is judged.
First, when the target application service in the abnormal state exists, information of the target application service in the abnormal state is sent to the designated address, or a visualized third view interface is generated by the information of the target application service in the abnormal state, and the third view interface is sent to the designated address.
In this embodiment, optionally, after sending the information of the target application service with the abnormal state to the specified address, or generating a visualized third view interface from the information of the target application service with the abnormal state, and sending the third view interface to the specified address, the method further includes:
and sending the information of the target application service with the abnormal state to a search server, or sending the third view interface to the search server. Wherein the search server is optionally an elastomer search, which is a Lucene (full text search engine kit) based search server that provides a distributed multi-user capable full text search engine. The elastomer search was developed in Java and released as open source under Apache license terms, is a currently popular enterprise-class search engine. Optionally, after the Pass cloud platform receives the data as the log data user, notifying related personnel of the exceeding of the index through mail and enterprise WeChat according to a preset index expression, and finally outputting the data to the elastic search.
In this embodiment, optionally, after the obtaining the target log file of the NAS directory from the target application service, the method further includes:
and sending all the target log files output to the NAS directory to a distributed file system server for storage and backup.
In this embodiment, optionally, various preset indexes are as follows:
the preset index of the node can be selected as follows:
1. CPU usage 90%, memory usage 90%, disk usage 85%, network receiving and transmitting limit value 30M/s.
The preset indexes of the container can be selected as follows:
1. CPU usage 90%, 2%, memory usage 90%, 3%, network receiving and transmitting limit value 5M/s.
The service preset index can be selected as follows:
1. response time 1 second, 2, containing Exception Exception.
In this embodiment, optionally, various indexes and descriptions are as follows:
1. node index description:
1. the Pass cloud platform monitors that the data type of Kafka is the data of a node CPU, the current value is 100% of the CPU utilization rate, then 100% is greater than a preset index (90%), then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to complete alarming, and meanwhile the data are stored in an elastic search.
2. The Pass cloud platform monitors that the data type of Kafka is data of node memory, the current value is 92% of memory utilization rate, 92% is greater than a preset index (90%), and then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to finish alarming, and meanwhile the data are stored in an elastic search.
3. The Pass cloud platform monitors that the data type of Kafka is data of a node disk, the current value is 90% of the memory utilization rate, 90% is greater than a preset index (85%), and then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to finish alarming, and meanwhile the data are stored in an elastic search.
4. The Pass cloud platform monitors that the data type of Kafka is data of a node network, the current value is 50MB/s, then 50MB/s > is a preset index (30M/s), then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to finish alarming, and meanwhile the data is stored in an elastic search.
2. Container index description:
1. the Pass cloud platform monitors that the data type of Kafka is the data of a container CPU, the current value is 100% of the CPU utilization rate, then 100% is greater than a preset index (90%), then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to complete alarming, and meanwhile the data are stored in an elastic search.
2. The Pass cloud platform monitors that the data type of Kafka is data of a container memory, the current value is 92% of the memory utilization rate, 92% is greater than a preset index (90%), and then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to finish alarming, and meanwhile the data is stored in an elastic search.
3. The Pass cloud platform monitors that the data type of Kafka is the data of a container network, the current value is 10MB/s, then 10MB/s > is a preset index (5M/s), then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to finish alarming, and meanwhile, the data is stored in an elastic search.
3. Log data description:
1. the Pass cloud platform monitors that the data type of Kafka is target application service response data, the current interface A response time is 3 seconds, then 3 seconds > a preset index (1 second), then the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to complete alarming, and meanwhile data are stored in an elastic search.
2. The Pass cloud platform monitors that the data type of Kafka is other data of service, the current value contains the acceptance information, and the Exception is indicated, so that the Pass cloud platform informs operation and maintenance personnel through mail or WeChat to complete alarming, and meanwhile the data is stored in an elastic search.
4. Description of heartbeat detection:
firstly, each target application service opens an interface in advance as a heartbeat interface for the Paas cloud platform to detect in a training mode. If the services A, B and C exist, the Paas cloud platform requests the heartbeat interfaces of the services A, B and C in a training mode, the target application service A responds normally, and the target application services B and C respond abnormally, so that the target application services B and C are described as having problems, then the Paas cloud platform informs an operation and maintenance person through mail or WeChat to complete an alarm, and meanwhile, data is stored in an elastic search.
According to the embodiment of the invention, through acquiring target log files which are automatically output to the NAS catalog by all target application services, then analyzing the target log files, uploading target log data extracted after analyzing the target log files to a target message queue, then monitoring the target log data in the target message queue, judging whether the target log data in the target message queue accords with a first preset index, if not, transmitting information that the target log data does not accord with the first preset index to a designated address, and solving the following problems in the prior art: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
In addition, the invention has the following beneficial effects: 1. the system can alarm hardware and software faults in real time, so that technicians can repair the faults in time; 2. the visual multidimensional monitoring index and the micro-service log viewing interface are provided, so that technicians can know the current resource use condition more conveniently, log viewing is more convenient, and the problem solving and positioning efficiency is improved; 3. all the monitoring data can be collected in real time and efficiently, and uniformly written into a high-throughput message queue Kafka, so that the monitoring data is convenient to store and process quickly, and a quick response query mechanism can be provided; 4. the method and the device provide multi-dimensional monitoring, such as server hardware indexes (CPU utilization rate, total memory, used memory, disk total space, disk used space, network sending flow and receiving flow), container monitoring indexes (container occupied memory, container CPU utilization rate, container network sending and receiving flow), service monitoring indexes (JVM memory condition, service response time, service request record and service throughput), can monitor hardware resources in real time, ensure high availability of service, and provide data basis for later service optimization.
Example two
Referring to fig. 2, fig. 2 is a partial structural frame diagram of a micro-service monitoring device 100 according to an embodiment of the present invention, and as can be obtained with reference to fig. 2, a micro-service monitoring device 100 according to the present invention includes:
the file obtaining module 110 is configured to obtain target log files that are automatically output to the NAS directory by all target application services.
And the parsing and uploading module 120 is configured to parse the target log file, and upload the target log data extracted after parsing the target log file to a target message queue.
The monitoring judging module 130 is configured to monitor the target log data in the target message queue, and judge whether the target log data in the target message queue meets a first preset index.
And the information sending module 140 is configured to send, when the target log data in the target message queue does not meet a first preset index, information that the target log data does not meet the first preset index to a specified address.
According to the embodiment of the invention, through acquiring target log files which are automatically output to the NAS catalog by all target application services, then analyzing the target log files, uploading target log data extracted after analyzing the target log files to a target message queue, then monitoring the target log data in the target message queue, judging whether the target log data in the target message queue accords with a first preset index, if not, transmitting information that the target log data does not accord with the first preset index to a designated address, and solving the following problems in the prior art: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
Example III
Referring to fig. 3, a computer readable storage medium 10 according to an embodiment of the present invention may be seen, where the computer readable storage medium 10 includes: ROM/RAM, magnetic disk, optical disk, etc., on which a computer program 11 is stored, said computer program 11, when executed, implementing the method of monitoring micro-services as described in embodiment one. Since the method of monitoring the micro service has been described in detail in the first embodiment, a description thereof will not be repeated.
According to the micro service monitoring method, all target application services are obtained and automatically output to the target log files of the NAS catalog, then the target log files are analyzed, target log data extracted after the target log files are analyzed are uploaded to the target message queue, then the target log data in the target message queue are monitored, whether the target log data in the target message queue meet a first preset index is judged, if not, information that the target log data do not meet the first preset index is sent to a designated address, and the following problems in the prior art are solved: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
Example IV
Referring to fig. 4, a computer device 20 according to an embodiment of the present invention includes a processor 21, a memory 22, and a computer program 221 stored in the memory 22 and capable of running on the processor 21, wherein the processor 21 implements the method for monitoring a square micro service according to the first embodiment when executing the computer program 221. Since the method of monitoring the micro service has been described in detail in the first embodiment, a description thereof will not be repeated.
According to the micro service monitoring method, all target application services are obtained and automatically output to the target log files of the NAS catalog, then the target log files are analyzed, target log data extracted after the target log files are analyzed are uploaded to the target message queue, then the target log data in the target message queue are monitored, whether the target log data in the target message queue meet a first preset index is judged, if not, information that the target log data do not meet the first preset index is sent to a designated address, and the following problems in the prior art are solved: the existing micro-service monitoring scheme has single function, cannot realize all-dimensional monitoring, cannot realize visualization, and cannot monitor micro-services in multiple dimensions.
The foregoing description is only of embodiments of the present invention, and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present invention or directly or indirectly applied to other related technical fields are included in the scope of the present invention.
Claims (5)
1. A method for monitoring a micro-service, comprising:
acquiring target log files which are automatically output to the NAS directory by all target application services;
analyzing the target log file, and sending the target log data extracted after analyzing the target log file to a target message queue;
monitoring the target log data in the target message queue, and judging whether the target log data in the target message queue accords with a first preset index;
if not, the information that the target log data does not accord with the first preset index is sent to a designated address;
the step of acquiring the target log files which are automatically output to the NAS directory by all the target application services comprises the following steps:
performing heartbeat detection on all the target application services, and judging whether the target application services in abnormal states exist or not;
if yes, sending the information of the target application service with the abnormal state to the appointed address, or generating a visual third view interface from the information of the target application service with the abnormal state, and sending the third view interface to the appointed address;
the step of sending the information of the target application service with the abnormal state to the appointed address, or generating a visualized third view interface with the information of the target application service with the abnormal state, and sending the third view interface to the appointed address, further comprises the following steps:
transmitting information of the target application service with abnormal state to a search server, or transmitting the third view interface to the search server;
after the target log files of all target application services are obtained and automatically output to the NAS directory, the method further comprises the following steps:
acquiring node index data and container index data of a target server cluster, and transmitting the node index data and the container index data to the target message queue;
monitoring the node index data and the container index data in the target message queue, and judging whether the node index data and/or the container index data in the target message queue meet a second preset index;
if not, the node index data and/or the information that the container index data in the target message queue do not accord with the second preset index is sent to the appointed address;
after the sending the information that the node index data and/or the container index data in the target message queue do not meet the second preset index to the designated address, the method includes:
generating a visual second view interface according to monitoring results of the node index data and the container index data in the target message queue, and sending the second view interface to the appointed address;
after the information that the target log data does not meet the first preset index is sent to the designated address, the method includes:
and generating a visual first view interface according to the monitoring result of the target log data in the target message queue, and sending the first view interface to the appointed address.
2. The method for monitoring micro-services according to claim 1, wherein after the acquiring the target log files of all the target application services output to the NAS directory, further comprises:
and sending all the target log files output to the NAS directory to a distributed file system server for storage and backup.
3. A micro-service monitoring device, comprising:
the file acquisition module is used for acquiring target log files which are automatically output to the NAS catalog by all target application services;
the analysis uploading module is used for analyzing the target log file and sending the target log data extracted after analyzing the target log file to a target message queue;
the monitoring judging module is used for monitoring the target log data in the target message queue and judging whether the target log data in the target message queue accords with a first preset index or not;
the information sending module is used for sending information that the target log data in the target message queue does not accord with a first preset index to a designated address when the target log data in the target message queue does not accord with the first preset index;
the step of acquiring the target log files which are automatically output to the NAS directory by all the target application services comprises the following steps:
performing heartbeat detection on all the target application services, and judging whether the target application services in abnormal states exist or not;
if yes, sending the information of the target application service with the abnormal state to the appointed address, or generating a visual third view interface from the information of the target application service with the abnormal state, and sending the third view interface to the appointed address;
the step of sending the information of the target application service with the abnormal state to the appointed address, or generating a visualized third view interface with the information of the target application service with the abnormal state, and sending the third view interface to the appointed address, further comprises the following steps:
transmitting information of the target application service with abnormal state to a search server, or transmitting the third view interface to the search server;
after the target log files of all target application services are obtained and automatically output to the NAS directory, the method further comprises the following steps:
acquiring node index data and container index data of a target server cluster, and transmitting the node index data and the container index data to the target message queue;
monitoring the node index data and the container index data in the target message queue, and judging whether the node index data and/or the container index data in the target message queue meet a second preset index;
if not, the node index data and/or the information that the container index data in the target message queue do not accord with the second preset index is sent to the appointed address;
after the sending the information that the node index data and/or the container index data in the target message queue do not meet the second preset index to the designated address, the method includes:
generating a visual second view interface according to monitoring results of the node index data and the container index data in the target message queue, and sending the second view interface to the appointed address;
after the information that the target log data does not meet the first preset index is sent to the designated address, the method includes:
and generating a visual first view interface according to the monitoring result of the target log data in the target message queue, and sending the first view interface to the appointed address.
4. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when executed, implements the method of monitoring a micro service according to any of claims 1-2.
5. A computer device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the method for monitoring a micro-service according to any one of claims 1-2 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911343029.9A CN111124830B (en) | 2019-12-24 | 2019-12-24 | Micro-service monitoring method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911343029.9A CN111124830B (en) | 2019-12-24 | 2019-12-24 | Micro-service monitoring method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111124830A CN111124830A (en) | 2020-05-08 |
CN111124830B true CN111124830B (en) | 2024-01-19 |
Family
ID=70501634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911343029.9A Active CN111124830B (en) | 2019-12-24 | 2019-12-24 | Micro-service monitoring method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111124830B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111625419B (en) * | 2020-05-15 | 2023-03-31 | 浪潮电子信息产业股份有限公司 | Log acquisition method, system, equipment and computer readable storage medium |
CN111338691A (en) * | 2020-05-20 | 2020-06-26 | 南京江北新区生物医药公共服务平台有限公司 | Container cloud platform based on k8s and supporting realization of micro-services and devops system |
CN112291805B (en) * | 2020-10-29 | 2023-11-07 | 浪潮电子信息产业股份有限公司 | OMC system monitoring method, device, equipment and readable storage medium |
CN112527618A (en) * | 2020-12-17 | 2021-03-19 | 中国农业银行股份有限公司 | Log collection method and log collection system |
CN114064335A (en) * | 2021-10-26 | 2022-02-18 | 微梦创科网络科技(中国)有限公司 | Attribution method and device based on data full link monitoring |
CN115297074B (en) * | 2022-08-02 | 2024-08-16 | 卓望数码技术(深圳)有限公司 | Method and device for monitoring micro-service application |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016180265A1 (en) * | 2015-05-13 | 2016-11-17 | 阿里巴巴集团控股有限公司 | Log event processing method and device |
CN107590048A (en) * | 2017-07-31 | 2018-01-16 | 北京北信源软件股份有限公司 | A kind of micro services log-output method and device |
CN108304704A (en) * | 2018-02-07 | 2018-07-20 | 平安普惠企业管理有限公司 | Authority control method, device, computer equipment and storage medium |
CN109446173A (en) * | 2018-09-18 | 2019-03-08 | 平安科技(深圳)有限公司 | Daily record data processing method, device, computer equipment and storage medium |
CN110309130A (en) * | 2018-03-21 | 2019-10-08 | 中国人民财产保险股份有限公司 | A kind of method and device for host performance monitor |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10348858B2 (en) * | 2017-09-15 | 2019-07-09 | Oracle International Corporation | Dynamic message queues for a microservice based cloud service |
US10666527B2 (en) * | 2018-04-26 | 2020-05-26 | EMC IP Holding Company LLC | Generating specifications for microservices implementations of an application |
-
2019
- 2019-12-24 CN CN201911343029.9A patent/CN111124830B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016180265A1 (en) * | 2015-05-13 | 2016-11-17 | 阿里巴巴集团控股有限公司 | Log event processing method and device |
CN107590048A (en) * | 2017-07-31 | 2018-01-16 | 北京北信源软件股份有限公司 | A kind of micro services log-output method and device |
CN108304704A (en) * | 2018-02-07 | 2018-07-20 | 平安普惠企业管理有限公司 | Authority control method, device, computer equipment and storage medium |
CN110309130A (en) * | 2018-03-21 | 2019-10-08 | 中国人民财产保险股份有限公司 | A kind of method and device for host performance monitor |
CN109446173A (en) * | 2018-09-18 | 2019-03-08 | 平安科技(深圳)有限公司 | Daily record data processing method, device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
基于Kubernetes的分布式ELK日志分析系统;陈建娟;刘行行;;电子技术与软件工程(15);218-219 * |
基于微服务架构的日志监控系统的设计与实现;张振;刘俊艳;;软件(11);204-209 * |
Also Published As
Publication number | Publication date |
---|---|
CN111124830A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111124830B (en) | Micro-service monitoring method and device | |
US9548886B2 (en) | Help desk ticket tracking integration with root cause analysis | |
US9497072B2 (en) | Identifying alarms for a root cause of a problem in a data processing system | |
US9497071B2 (en) | Multi-hop root cause analysis | |
US11457029B2 (en) | Log analysis based on user activity volume | |
CN108989136B (en) | Business end-to-end performance monitoring method and device | |
Picoreti et al. | Multilevel observability in cloud orchestration | |
US9276803B2 (en) | Role based translation of data | |
JP2015526822A (en) | Compliance testing engine for integrated computer systems | |
CN111585840B (en) | Service resource monitoring method, device and equipment | |
CN107704387B (en) | Method, device, electronic equipment and computer readable medium for system early warning | |
CN111163150A (en) | Distributed calling tracking system | |
CN112202617B (en) | Resource management system monitoring method, device, computer equipment and storage medium | |
CN114745295A (en) | Data acquisition method, device, equipment and readable storage medium | |
CN112835792A (en) | Pressure testing system and method | |
KR20220166760A (en) | Apparatus and method for managing trouble using big data of 5G distributed cloud system | |
CN117971799A (en) | Data development platform and data development method | |
CN114064377A (en) | Load balancer monitoring method, device, equipment and storage medium | |
KR100992417B1 (en) | Monitoring method for unified management system, system for the same, and recording medium storing a program thereof | |
CN117478679A (en) | Dynamic load balancing method based on data analysis | |
KR20170122874A (en) | Apparatus for managing log of application based on data distribution service | |
CN114090382B (en) | Health inspection method and device for super-converged cluster | |
CN117033167A (en) | Database testing method, device, equipment and storage medium | |
Brim et al. | Monitoring extreme-scale Lustre toolkit | |
CN116260703A (en) | Distributed message service node CPU performance fault self-recovery method and device |
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 |