Error loading config: mapping values are not allowed in this context

2,449 views
Skip to first unread message

carlos.di...@odigeo.com

unread,
Oct 20, 2016, 11:44:05 AM10/20/16
to Prometheus Developers
Hello,

Trying to configure blackbox job with tcp module, I am getting these error:

Error loading config: couldn't load configuration (-config.file=prometheus.yml): yaml: line 109: mapping values are not allowed in this context" source="main.go:126"

My job configuration:

job_name: blackbox_tcp
metrics_path: /probe
params:
module:
- tcp_connect
relabel_configs:
-
regex: "(.*)(:5051)?"
replacement: "${1}"
source_labels:
- __address__
target_label: __param_target
-
regex: (.*)
replacement: "${1}"
source_labels:
- __param_target
target_label: instance
-
regex: .*
replacement: "localhost:9115"
source_labels: []
target_label: __address__
scheme: http
scrape_interval: 10s
static_configs:
-
targets:
- 10.9.19.128
labels:
group: 'influx-1'
- 10.9.19.125

Why I can't use labels / groups in this static config?

Thank you very much in advance

Brian Brazil

unread,
Oct 20, 2016, 2:42:53 PM10/20/16
to carlos.di...@odigeo.com, Prometheus Developers
You need to outdent this line so it's at the same level as "targets".

Brian
 
               group: 'influx-1'
          - 10.9.19.125

Why I can't use labels / groups in this static config?

Thank you very much in advance

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
To post to this group, send email to prometheus-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/1b533c24-eac7-4a49-83e6-577cec823bdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

carlos.di...@odigeo.com

unread,
Oct 21, 2016, 4:57:33 AM10/21/16
to Prometheus Developers, carlos.di...@odigeo.com
Thank you
Reply all
Reply to author
Forward
0 new messages