我试图使用Prometheus监控我们的一个Spring引导应用程序,但不幸的是,该服务的状态在ubuntu服务器中没有启动,它显示了一些错误,如-
/prometheus: x509:由未知的授权机构签署的证书,从我本地的普罗米修斯那里,这个服务启动了,并且还能够监控一些http请求。enter image description here
发布于 2021-05-17 05:15:54
我也遇到过同样的问题。通过以下方式解决:
按照@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发布于 2021-11-23 19:15:12
如果您使用的是自签名证书,则可以将该证书添加到tls_config下的scrape_configs
global:
scrape_interval: 15s
external_labels:
monitor: 'prometheus'
scrape_configs:
- job_name: 'job-name'
static_configs:
- targets:
- host_name_or_ip_address1
tls_config:
ca_file: /path/to/prometheus.crt
scheme: httpshttps://stackoverflow.com/questions/63507002
复制相似问题