prometheus - 使用 Prometheus 和 Envoy 侧车代理抓取应用程序指标
问题描述
我正在为我的工作负载使用 GKE。我已经在我的集群上安装了 Istio 1.11.0。我还istio-system
使用此链接在命名空间中安装了 Prometheus 。
我在prom-test
命名空间中部署了一个 Python 应用程序,它在端口 8080 收集指标,如下所示。
我在部署文件中使用了以下注释来让Prometheus抓取指标
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/scheme: http
prometheus.io/path: "/metrics"
1)应用程序容器和2)特使代理容器中运行了2个容器
当我打开 Prometheus 仪表板时,我看到所有目标都已启动,并且对于我的应用程序,它正在被抓取
但我可以看到任何与应用程序相关的指标?
如果这里的退伍军人可以提供相同的建议,那将非常有帮助
解决方案
我已经解决了这个问题。似乎为。Python 我需要将信息添加为prommetheus.yaml
文件中的抓取配置。一旦我实现了相同的,它就开始工作了。
能够在 Istio prometheus 上查看指标。
推荐阅读
- jquery - 列宽中的 jQuery 数据表错误
- android - 将 jars 作为库添加到 Android Studio,错误:发现多个文件与操作系统无关路径 'META-INF/DEPENDENCIES'
- java - UnsupportedEncodingException 错误,但我没有读取任何文件?
- sql - 如何随机化上传图片的名称
- javascript - 我的 Cordova 应用程序会被拒绝吗?从 json 响应加载外部数据
- javascript - Node.js/Puppeteer - DOM NodeList 到 JS 对象
- sql - 约束自引用外键以限制嵌套(SQL、Sequelize)
- java - 如何访问特定列是 csv 文件?如果该列中的单元格为空,则根本不要在 csv 文件中写入行
- abap - 如何在crm中获取视图的所有属性?
- reactjs - 更改不会反映在反应中的 UI 中