Spacing is very important in YAML and to validate the changes before they take effect you can issue the following command:
promtool check config /etc/prometheus/prometheus.yml