IC使用-enable-prometheus-metrics暴露prometheus格式的指标,默认metrics 接口为http://<pod_ip>:9113/metrics
,具体可以参考readme中指标含义描述。
Grafana 示例可以参考官方的 dashboard.json 文件
通常情况下,prometheus采集pod指标有两种自动发现方案:
promethues通过注解自动添加pod到监控列表。在pod的annotations中定义,比如 2.2.3. 的 daemon-set/nginx-ingress.yaml 中注解部分
prometheus通过ServiceMonitor添加pod到监控列表。自定义资源ServiceMonitor关联到service完成自动发现Endpoint中Pod列表