title: dashes and indentations in yaml
body: <p>I'm going through the &quot;getting started&quot; <a href="https://prometheus.io/docs/prometheus/latest/getting_started/" rel="nofollow noreferrer">tutorial for Prometheus</a>. I'm getting very hung up on the YAML config file:</p>
  <pre><code>scrape_configs:
    - job_name:       'node'
  
      # Override the global default and scrape targets from this job every 5 seconds.
      scrape_interval: 5s
  
      static_configs:
        - targets: ['localhost:8080', 'localhost:8081']
          labels:
            group: 'production'
  
        - targets: ['localhost:8082']
          labels:
            group: 'canary'
  
  </code></pre>
  <p>So apparently hyphens are supposed to indicate one of two things: The first item in a new list, or a key value pair.</p>
  <ul>
  <li><p>So it looks like <code>job_name: 'node'</code> is a key value pair. Why then is everything after it indented?</p>
  </li>
  <li><p><code>targets</code> also looks like a key value pair. But so does <code>labels</code> and it doesn't have a hyphen. Further, <code>group</code> is indented by one space from <code>labels</code>.</p>
  </li>
  </ul>
  <p>It's very, very difficult for me to tell what is going on here. I need to know if I am ever going to customize this file (which I already tried to do and received errors when starting up Prometheus).</p>
  <p>What is the logical structure of this file?</p>