当前位置: 首页 > 知识库问答 >
问题:

kubernetes_sd_config(在prometheus中)与metrics-server和kube-state-metrics之间有什么区别?

袁何平
2023-03-14
  1. kubernetes_sd_config(在prometheus中)是否提供了我可以使用metrics-server和kube-state-metrics获得的所有数据?
  2. kubernetes_sd_config是否足以进行监视?
  3. metrics-server只是为了向内部组件(如hpa控制器)提供数据(小于kubernetes_sd_config)吗?
  4. 是只针对对象(pod、deployment...)的kube-state-metrics在K8S中?
  5. 他们各自的目标是什么?

共有1个答案

谢清野
2023-03-14

1 Metrics-server是一个集群级组件,它通过Summary API定期从Kubelet服务的所有Kubernetes节点中获取容器CPU和内存使用指标。

Kubelet导出一个“摘要”API,它聚合了来自所有吊舱的统计数据。

$ kubectl proxy &
Starting to serve on 127.0.0.1:8001
$ NODE=$(kubectl get nodes -o=jsonpath="{.items[0].metadata.name}")
$ curl localhost:8001/api/v1/proxy/nodes/${NODE}:10255/stats/summary

用例:

    null
  • 计数k8s对象的数量。
  • 有多少个名称空间?

sysdig-k8s-state-metrics提供了进一步的信息。

3 Prometheus node_exporter-获取主机级别矩阵并将它们公开给Prometheus。

    null
 类似资料:
  • Overview kube-state-metrics (KSM) is a simple service that listens to the Kubernetes APIserver and generates metrics about the state of the objects. (See examples inthe Metrics section below.) It is n

  • 此任务向您展示如何使用Prometheus查询Istio监控信息。 作为此任务的一部分,您将安装Prometheus Istio插件,并使用Web界面查询监控信息。 本章使用BookInfo示例应用程序作为例子。 开始之前 安装Istio,部署应用。 查询Istio metrics 要查询Mixer提供的监控信息,先要安装Prometheus插件。 在Kubernetes中,执行以下命令: kub

  • 我使用metrics-server(https://github . com/kubernetes-incubator/metrics-server/)从kubernetes集群中的容器收集核心指标。 我可以为每个容器获取2个资源使用指标。 < li>cpu使用率 < li >内存使用情况 然而,我不清楚是否 > 这些指标是随着时间的推移而累积的,或者它们已经针对特定时间窗口(1分钟/ 30秒)进

  • Jboot 内置了一套监控机制,可以用来监控 Controller、Service 等的 API 访问情况,同时 Jboot 提供了如下 5 个注解,方便用户对API自由监控。 @EnableMetricConcurrency @EnableMetricCounter @EnableMetricHistogram @EnableMetricMeter @EnableMetricTimer 这些监控

  • Sentinel provides real-time metrics, including resource count, response time, concurrency, etc. You can view these metrics on Sentinel-Dashboard, but you can also use the metrics API to retrieve data.

  • Metrics 设计思路 Seata作为一个被集成的数据一致性框架,Metrics模块将尽可能少的使用第三方依赖以降低发生冲突的风险; Metrics模块将竭力争取更高的度量性能和更低的资源开销,尽可能降低开启后带来的副作用; 插件式——Metrics是否激活、数据如何发布,去取决于是否引入了对应的依赖,例如在TC Server中引入seata-metrics-prometheus,则自动启用并将