【发布时间】:2020-01-22 18:15:42
【问题描述】:
我已在 kube-prometheus 之后将 prometheus 安装到我的 Kubernetes v1.17 KOPS 集群中,确保设置了 --authentication-token-webhook=true 和 --authorization-mode=Webhook prerequisets 并指定了 kube-prometheus/kube-prometheus-kops.libsonnet 配置。
然后,我使用 https://github.com/helm/charts/tree/master/stable/postgresql 安装了 Postgres,使用提供的 values-production.yaml 和以下设置:
metrics:
enabled: true
# resources: {}
service:
type: ClusterIP
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9187"
loadBalancerIP:
serviceMonitor:
enabled: true
namespace: monitoring
interval: 30s
scrapeTimeout: 10s
两个服务都已启动并正常工作,但 prometheus 没有从 Postgres 中发现任何指标。
我的 postgres pod 上的 metrics 容器上的日志没有错误,monitoring 命名空间中的任何 pod 也没有错误。
要让 Postgres 指标导出器到达 Prometheus,还需要哪些额外步骤?
【问题讨论】:
标签: postgresql kubernetes prometheus prometheus-operator