I am trying to set up a new Prometheus server, and the config file has changed a little since I last did this. I have edited my config file, but I am getting the following error.
Couldn't load configuration (-config.file=/etc/prometheus/prometheus.yml): yaml: line 13: found unexpected ':'
here is my prometheus.yml file:
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'int-metrics'
rule_files:
scrape_configs:
- job_name: 'containers'
scrape_interval: 5s
static_configs:
- targets: ['192.168.120.11:9104',192.168.120.12:9104','192.168.120.13:9104','192.168.120.14:9104']
- job_name: 'rabbitmq'
scrape_interval: 5s
static_configs:
- targets: ['192.168.120.11:9090','192.168.120.12:9090','192.168.120.13:9090','192.168.120.14:9090']
- job_name: 'node'
scrape_interval: 15s
static_configs:
- targets: ['192.168.120.11:9100','192.168.120.12:9100','192.168.120.13:9100','192.168.120.14:9100']
line 13 is the first "static_configs" line. All the documentation says there should be a colon. If I remove it I get this error:
Couldn't load configuration (-config.file=/etc/prometheus/prometheus.yml): yaml: line 13: could not find expected ':'
?!? what is wrong with the syntax?
rule_files
?