Help With Validating This Heartbeat Config

I am having a tough time starting a heartbeat container. I am bind mounting the config file into the path /usr/share/heartbeat/heartbeat.yml. My config file is below. I'm sure this is something simple but I haven't been able to find the error. I have even used a couple different yaml validators and it says the syntax is good. Some assistance would be greatly appreciated. Thank you.

logs

Attaching to heartbeat
heartbeat        | Exiting: error loading config file: missing '}' parsing splice accessing config (source:'heartbeat.yml')
heartbeat exited with code 1
---
heartbeat.monitors:
  - type: "http"
    schedule: '@every 5s'
    urls:
      - "https://${CONTAINER_ELASTIC_SEARCH}:{PORT_ELASTIC_SEARCH}"
      - "https://${CONTAINER_KIBANA}:${KIBANA_PORT}"
  - type: "icmp"
    schedule: '@every 5s'
    hosts:
      - "${CONTAINER_ELASTIC_SEARCH}"
      - "${CONTAINER_KIBANA}"

heartbeat.autodiscover:
  providers:
    - type: "docker"
      templates:
        - condition:
            contains:
              docker.container.image: "redis"
          config:
            - type: "tcp"
              hosts: 
                - "${data.host}:${data.port}"
              schedule: "@every 1s"
              timeout: "1s"
        - condition:
            contains:
              docker.container.images: dotmusic:nginx
          config:
            - type: "http"
              schedule: "@every 5s"
              urls: 
                - "https://${data.host}:${data.port}" 

processors:
  - add_docker_metadata: ~

output.elasticsearch:
  hosts: 
    - '${CONTAINER_ELASTIC_SEARCH}:PORT_ELASTIC_SEARCH}'
  protocol: "https"
  ssl.certificate_authorities: 
    - '${CERTS_DIR}/ca/ca.crt'
  ssl.certiifcate: '${CERTS_DIR}/${CONTAINER_HEARTBEAT}/${CONTAINER_HEARTBEAT}.crt'
  ssl.key: '${CERTS_DIR}/${CONTAINER_HEARTBEAT}/${CONTAINER_HEARTBEAT.key'
  ssl.enabled: true
  ssl.verification_mode: "certiifcate"

setup.kibana:
  host: "${CONTAINER_KIBANA}:${PORT_KIBANA}"
  protocol: "https"
  ssl.enabled: true
  ssl.verification_mode: "certificate"
  ssl.certificate_authorities: 
    - '${CERTS_DIR}/ca/ca.crt'
  ssl.certiifcate: '${CERTS_DIR}/${CONTAINER_HEARTBEAT}/${CONTAINER_HEARTBEAT}.crt'
  ssl.key: '${CERTS_DIR}/${CONTAINER_HEARTBEAT}/${CONTAINER_HEARTBEAT.key'

I found it...only after I submitted this and I was able to see it on a different background.

Both ssl.key values are missing the last curly brace.

1 Like

That's a tricky one, glad you found it, definitely hard to see :slight_smile: