我正在尝试使用 prometheus 和 blackbox exporter 来监控某些东西。这是我的 prometheus.yml 文件。这是我得到的错误:
couldn't load configuration (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing YAML file /etc/prometheus/prometheus.yml: yaml: line 9: mapping values are not allowed in this context
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: blackbox
metrics_path:
params:
module: [http_2xx]
static_configs:
- targets:
- https://www.robustperception.io/
- http://prometheus.io/blog
- http://yourdomain/usage-api/health
- http://yourdomain/google-apm/health
- https://google.com
- https://www.telegraph.co.uk
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]