Я пытаюсь использовать Prometheus и экспортер черного ящика, чтобы что-то контролировать. Вот мой файл 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
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]
В вашем разделе заданий черного ящика есть лишние пробелы. Должно быть так ->
- job_name: blackbox metrics_path: <metrics_path> params: module: [http_prometheus] ....