问题描述
我正尝试使用Prometheus监视我们的Spring引导应用程序之一,但不幸的是,该服务的状态在ubuntu服务器中没有启动,它显示了一些错误,例如–
/ prometheus:x509:未知授权机构签名的证书,该服务在我本地的Prometheus中处于启用状态,并且还可以监视某些http请求。 enter image description here
解决方法
我遇到了同样的问题。 通过以下方式解决:
按照@Shmuel 的建议配置 Prometheus 以忽略 ssl 验证
global:
scrape_interval: 15s
external_labels:
monitor: 'prometheus'
scrape_configs:
- job_name: 'job-name'
static_configs:
- targets:
- host_name_or_ip_address1
- host_name_or_ip_address2
- host_name_or_ip_address2
scheme: https # to use https instead of http for scraping
tls_config:
insecure_skip_verify: true # This is the key