我有一个使用 prometheus 运算符的 prometheus 设置。我已经配置了一个黑盒导出器,用于使用 prometheus 监控一些 url。类似地,我实现了一个 json 导出器,用于从 json url 路径获取指标。我的配置如下:
metrics_path: /probe
params:
jsonpath: [$.details.db.details.hello] # Look for the nanoseconds field
static_configs:
- targets:
- https://URL path
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: jsonexporter:9116 # Json exporter.
metric_relabel_configs:
- source_labels: value
target_label: hello```
But the issue is, getting error while reloading the Prometheus as follows:
level=error ts=2019-04-16T06:05:24.395218368Z caller=main.go:597 err="Error loading config couldn't load configuration (--config.file=/etc/prometheus/config_out/prometheus.env.yaml): parsing YAML file /etc/prometheus/config_out/prometheus.env.yaml: yaml: unmarshal errors:\n line 3871: cannot unmarshal !!str `value` into model.LabelNames"
Cam someone help me to correct this?