如何解决如何使用外部 web api 与 docker 中的 prometheus 通信
我是监控新手。我正在尝试使用 grafana 学习普罗米修斯,我从 docker 安装了普罗米修斯,并将 prometheus.yml 设置在共享的 Windows 文件夹中。
然后我访问 http://localhost:9090,prometheus 服务器就启动了。
然后我启动了一个WebApi C#来测试,这个windows中的webapi运行在http://localhost:5000。
当我再次访问 prometheus 服务器时,我的 WebApi 总是宕机
我的普罗米修斯,yml
scrape_configs: # The job name is added as a label
`job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'WebApiTemplate'
static_configs:
- targets:
- localhost:5000
metrics_path: /metrics-text
如何正确配置prometheus.yml?
是否需要将我的 webApi 放在 docker 中才能正常工作?
谢谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。