与另一个问题非常相似,但略有不同。尝试了接受的答案,但仍然没有运气。
运行命令时出现此错误:
bosh -d prometheus deploy -n pfg-prometheus-boshrelease/manifests/prometheus.yml -o replace_vars.yml
预计会在路径 '/instance_groups/name=prometheus2/jobs/name=prometheus2/properties/prometheus/scrape_configs/job_name=bosh/static_configs/targets?但找到'[]interface {}'
替换变量.yml:
- type: replace
path: /instance_groups/name=prometheus2/jobs/name=prometheus2/properties/prometheus/scrape_configs/job_name=bosh/static_configs/targets?/-
value: 192.168.123.26:9190
清单部分:
- name: prometheus2
properties:
prometheus:
rule_files:
- ...
scrape_configs:
- file_sd_configs:
- files:
- /var/vcap/store/bosh_exporter/bosh_target_groups.json
job_name: prometheus
relabel_configs:
- action: keep
...
- regex: (.*)
...
- job_name: bosh
scrape_interval: 2m
scrape_timeout: 1m
static_configs:
- targets:
- localhost:9190
正确的路径是什么?
编辑:我查看了bosh cli ops 文件,但找不到像我这样的示例。