监控 -- kubernetes -- prometheus

1.但是Heapster无法做Kubernetes下应用的监控。现在,Heapster作为Kubernetes下的开源监控解决方案已经被其弃用,Prometheus成为Kubernetes官方推荐的监控解决方案。

 2.Prometheus同样通过Kubernetes的cAdvisor接口(/api/v1/nodes/${1}/proxy/metrics/cadvisor)获取pod和container的性能监控数据,同时可以使用Kubernetes的Kube-state-metrics插件来获取集群上Pod, DaemonSet, Deployment, Job, CronJob等各种资源对象的状态,这反应了使用这些资源的应用的状态。

3.同时通过Kubernetes api获取node,service,pod,endpoints,ingress等服务的信息,然后通过匹配注解中的值来获取采集目标。

4.

其中 global 模块控制 Prometheus Server 的全局配置:

  • scrape_interval:表示 prometheus 抓取指标数据的频率,默认是15s,我们可以覆盖这个值
  • evaluation_interval:用来控制评估规则的频率,prometheus 使用规则产生新的时间序列数据或者产生警报

https://www.kancloud.cn/huyipow/prometheus/527009

原文地址:https://www.cnblogs.com/hixiaowei/p/10015309.html