0
# my global config
global:
  scrape_interval: 15s

label: titan
 scrape_configs:
  - job_name: cassandra_titan
    static_configs:
      - targets:
         - 00.0.0.00:7070

  - job_name: titan_server
    static_configs:
      - targets:
         - 00.0.0.00:9100

label: cassandra_development
 scrape_configs:
  - job_name: cassandra_node1
    static_configs:
      - targets:
         - 10.0.0.00:7070

   - job_name: cassandra_node2
    static_configs:
      - targets:
         - 00.0.0.00:7070

  - job_name: cassandra_node3
    static_configs:
      - targets:
         - 10.0.0.00:7070

I am writing a prometheus.yml file to monitor multiple cassandra nodes. I grouped the nodes under 'titan' and 'cassandra_development'. Getting the below error while starting prometheus:

msg="Error loading config" err="couldn't load configuration (--config.file=prometheus.yml): yaml: line 5: mapping values are not allowed in this context"

Tom Aranda
  • 5,919
  • 11
  • 35
  • 51
user9062792
  • 11
  • 1
  • 5

1 Answers1

0

I had this and I think it's your yaml. Run it through a yaml linter (such as http://yamllint.com ) and then fix any errors that it throws.

  • 1
    Welcome to SO. It's a possibly useful answer, but more specific would be better. The questioner has provided his YAML, so can you check if it's valid? –  Apr 02 '18 at 17:05