【问题标题】:Do we need Prometheus Metrics in Azure Monitor?我们需要 Azure Monitor 中的 Prometheus Metrics 吗?
【发布时间】:2021-08-16 02:32:45
【问题描述】:

Microsoft article 谈论如何使用 Azure Monitor 来抓取 Prometheus 指标。此问题的范围仅限于 K8 集群监控(而不是部署在其上的工作负载/应用程序)。据我了解,即使是 Prometheus 也使用代理(也称为 exporters)来发布 K8 API 服务器(通常是 /metrics 端点)公开的指标,然后 Prometheus 通过这些端点抓取指标。

用于容器的 Azure Monitor 也做同样的事情(从 API 服务器收集)甚至更多。它提供了相当详尽的list of metrics

我的问题是:除非我正在查看应用程序/工作负载集成(或 Prometheus 格式),否则我是否会遗漏任何 iof,我只将 Azure Monitor 用于容器,并没有真正抓取我的 AKS 集群/节点/pods/api 的 Prometheus 指标服务器等?

【问题讨论】:

    标签: azure-aks azure-monitor


    【解决方案1】:

    不,如果需要,只收集集群指标是完全可以的。

    在“prometheus-data-collection-settings”中将 monitor_kubernetes_pods 设置为 false。

    prometheus-data-collection-settings: |- 
    [prometheus_data_collection_settings.cluster] 
    interval = "1m"
    kubernetes_services = ["http://my-service-dns.my-namespace:9102/metrics"]
    monitor_kubernetes_pods = false 
    

    请记住,只有当您关心使用 Prometheus 端点获取指标时,所有这些讨论才有意义;通常,AKS 已自行发出指标,您可以在 Azure Monitor 中查看。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-27
      • 1970-01-01
      • 1970-01-01
      • 2020-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多