概述
- Prometheus(普罗米修斯)︰容器监控系统。 https://prometheus.io https://github.com/prometheus
- Grafana:是一个开源的度量分析和可视化系统。 https://grafana.com/grafana
- node_exporter插件收集服务器数据。https://github.com/prometheus/node_exporter/
思路:node_exporter插件收集服务器数据——prometheus存储插件收集的数据——grafana展示prometheus收集的数据
一、介绍Prometheus
Prometheus(普罗米修斯)是一套开源的监控&报警&时间序列数据库的组合,起始是由SoundCloud公司开发的。随着发展,越来越多公司和组织接受采用Prometheus,社会也十分活跃,他们便将它独立成开源项目,并且有公司来运作。Google SRE的书内也曾提到跟他们BorgMon监控系统相似的实现是Prometheus。现在最常见的Kubernetes容器管理系统中,通常会搭配Prometheus进行监控。
Prometheus基本原理是通过HTTP协议周期性抓取被监控组件的状态,这样做的好处是任意组件只要提供HTTP接口就可以接入监控系统,不需要任何SDK或者其他的集成过程。这样做非常