超过上下文截止日期-Prometheus [英] Context Deadline Exceeded - prometheus
问题描述
我具有许多工作的普罗米修斯配置,我在这些数据上通过HTTP抓取指标.但是我有一项工作需要在https上抓取指标.
I have prometheus configuration with many jobs where i am scraping metrics over http. But I have one job where i need to scrape the metrics over https.
当我访问时:
https://ip-address:port/metrics
我可以看到指标. 我在prometheus.yml配置中添加的作业是:
I can see the metrics. The job that I have added in the prometheus.yml configuration is:
- job_name: 'test-jvm-metrics'
scheme: https
static_configs:
- targets: ['ip:port']
当我重新启动普罗米修斯时,我可以在目标上看到以下错误:
When i restart the prometheus I can see error on my target that says:
上下文截止日期已结束
context deadline exceeded
我读到也许scrape_timeout是问题所在,但我将其设置为50秒,仍然是同样的问题.
I have read that maybe the scrape_timeout is the problem, but I have set it to 50 sec and still the same problem.
什么会导致此问题以及如何解决? 谢谢!
What can cause this problem and how to fix it? Thank you!
推荐答案
我过去也遇到过相同的问题.就我而言,问题出在证书上,我通过添加以下内容对其进行了修复:
I had a same problem in the past. In my case the problem was with the certificates and I fixed it with adding:
tls_config:
insecure_skip_verify: true
您可以尝试一下,也许可以用.
You can try it, maybe it will work.
这篇关于超过上下文截止日期-Prometheus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!