[英]Monitoring inside Pods with Prometheus
I want to know if it's possible to get metrics for the services inside the pods using Prometheus.我想知道是否可以使用 Prometheus 获取 pod 内服务的指标。
I don't mean monitoring the pods but the processes inside those pods .我的意思不是监视 pod,而是监视这些 pod中的进程。 For example, containers which have apache or nginx running inside them along other main services, so I can retrieve metrics for the web server and the other main service (for example a wordpress image which aso comes with an apache configured).例如,容器中有 apache 或 nginx 与其他主要服务一起在其中运行,因此我可以检索 web 服务器和其他主要服务的指标(例如 wordpress 图像,它配置了 apache)。
The cluster already has running kube-state-metrics, node-exporter and blackbox exporter.集群已经运行了 kube-state-metrics、node-exporter 和 blackbox exporter。
Is it possible?是否可以? If so, how can I manage to do it?如果是这样,我该怎么做?
Thanks in advance提前致谢
Prometheus works by scraping an HTTP endpoint that provides the actual metrics. Prometheus 通过抓取提供实际指标的 HTTP 端点来工作。 That's where you get the term "exporter".这就是您获得术语“出口商”的地方。 So if you want to get metrics from the processes running inside of pods you have three primary steps:因此,如果您想从 Pod 内运行的进程获取指标,您需要三个主要步骤:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.