官术网_书友最值得收藏!

Monitoring and logging tools

Once you start to manage microservices using a cloud infrastructure, there are various monitoring tools that can help you to manage your servers.

Amazon CloudWatch is the built-in monitoring tool for AWS. No agent installation is needed; it automatically gathers metrics from AWS instances and allows the user to visualize these in order to carry out DevOps tasks. It also supports the ability to set an alert based on the criteria that you set. The following screenshot shows the Amazon CloudWatch metrics for an EC2 instance:

Amazon CloudWatch also supports the gathering of an application log. This requires us to install an agent on an EC2 instance. Centralized log management is useful when you need to start managing multiple microservice instances.

ELK is a popular combination of stacks that stands for Elasticsearch (https://www.elastic.co/products/elasticsearch), Logstash (https://www.elastic.co/products/logstash), and Kibana (https://www.elastic.co/products/kibana). Logstash aggregates the application log, transforms it to JSON format, and then sends it to Elasticsearch. Elasticsearch is a distributed JSON database. Kibana can visualize the data that's stored on Elasticsearch. The following Kibana example shows an nginx access log:

Grafana (https://grafana.com) is another popular visualization tool. It used to be connected with time series databases such as Graphite (https://graphiteapp.org) or InfluxDB (https://www.influxdata.com). A time series database is designed to store data that's flat, de-normalized, and numeric, such as CPU usage or network traffic. Unlike RDBMS, a time series database has some optimization in order to save data space and can carry out faster queries on historical numeric data. Most DevOps monitoring tools use time series databases in the backend.

The following Grafana screenshot shows some Message Queue Server statistics:

主站蜘蛛池模板: 郸城县| 伊川县| 石门县| 阿克苏市| 永年县| 乐至县| 平舆县| 洪泽县| 金川县| 花莲市| 普陀区| 万年县| 伊吾县| 辽源市| 楚雄市| 衢州市| 普宁市| 井冈山市| 安陆市| 通道| 中阳县| 白城市| 绥中县| 梅河口市| 闵行区| 顺昌县| 杭州市| 鹿邑县| 嘉祥县| 修水县| 颍上县| 锡林浩特市| 麻阳| 潼关县| 台江县| 仙桃市| 托克托县| 藁城市| 凌云县| 江源县| 桂林市|