| With the rapid development of container-based virtualization technology and the continuous improvement of application complexity,the cloud computing field is gradually migrating from traditional cloud computing platforms to microservice architectures represented by Docker and Kubernetes.Microservice architecture makes software development more efficient,improves computing resource utilization,and enables faster service updates.However,the operation,maintenance and management of microservice systems becomes more difficult than tradition.Using the monitoring system to monitor the resource usage of microservices and the operation of the platform is one of the important means to ensure the availability and stability of the system.Based on the above background,the thesis designs and implements the base resource monitoring system of microservices,which can monitor the resources and operation of micro-services,provide collection and storage including metrics processing and aggregation,support dashboard visualization and abnormal alerts,and support resource prediction to know how the service will perform in the future.Main contents of this paper are as follows.(1)Analysis system requirements.First,analyze the main objectives of monitoring system visualization,abnormal alert,trend prediction,comparison analysis,etc.by investigating the current research status of resource monitoring at home and abroad.Then extract the acquisition and storage capabilities,data visualization capabilities,abnormal alert capabilities and trend analysis capabilities that the system needs to have.Finally,determine the system boundary and divide the system into four parts: data collection and storage,dashboard,alert and resource prediction by analyzing the internal and external data flow of the system.And describe the interaction process of each part in detail.(2)Design and implement system.The architecture of the system based on layered design.The configuration storage is completed based on the loose data storage capability provided by Mongo DB,a flexible and simple non-relational database.Influx DB has its own superiority in time series data storage.Data collection and storage abstracting data input sources,data handlers,and data aggregators.The intuitive display of metric data relies on the Grafana visualization framework.System use alert rules and time series data query capability of Influx QL to generate alert events,then pushes alerts through Webhooks.A weighted allocation HOLT_WINTERS-Random Forest combination model is proposed to predict resource usage,which has better prediction effect than a single model.(3)Test system.By deploying the monitoring system in the actual micro-service system,writing test cases to test the main functions of the system function modules and record the results,verifying system capabilities of the data collection,dashboard,alert and resource prediction.Use stress testing tools to test the performance of the system to verify its availability and stability.The monitoring system running smoothly in the actual micro-service system,represents it has interactive friendly configuration operations and clear management processes to reduce user costs.At the same time,it can intuitively display monitoring views by dashboard,reduce labor costs by alerts,and help with decision-making by resource forecasting. |