Prometheus 将普罗米修斯配置为从自定义URL刮取
有人能帮我在prometheus.yml中添加什么配置来抓取像Prometheus 将普罗米修斯配置为从自定义URL刮取,prometheus,Prometheus,有人能帮我在prometheus.yml中添加什么配置来抓取像https://www2.abc.abc.com/servlet/metrics/ 我能够获得常规节点导出器,但我们正在使用自定义度量构建一些东西 我当前的配置文件如下所示: global: scrape_interval: 10s scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targ
https://www2.abc.abc.com/servlet/metrics/
我能够获得常规节点导出器,但我们正在使用自定义度量构建一些东西
我当前的配置文件如下所示:
global:
scrape_interval: 10s
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter_metrics'
scrape_interval: 5s
static_configs:
- targets: ['mockapi:9100']
- job_name: new-job
scrape_interval: 5s
static_configs:
- targets: ['www2.abc.abc.com:443']
metrics_path: /servlet/metrics/
scheme: https
我需要一份新的工作,这项工作在https://www2.abc.abc.com/servlet/metrics/
到目前为止,我的所有度量都在http上,但这一个在https上。添加一个新作业,该作业配置自定义度量路径和方案 它看起来像这样:
global:
scrape_interval: 10s
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter_metrics'
scrape_interval: 5s
static_configs:
- targets: ['mockapi:9100']
- job_name: new-job
scrape_interval: 5s
static_configs:
- targets: ['www2.abc.abc.com:443']
metrics_path: /servlet/metrics/
scheme: https
端口443是HTTPS端口,
scheme:HTTPS
确保使用HTTPS协议,并且metrics\u path
使用metrics处理程序指向您的自定义路径。这实际上也解决了我的问题!谢谢