# Heartbeat not starting when second monitor is added

**URL:** https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360
**Category:** Beats
**Tags:** heartbeat
**Created:** [March 3, 2017, 8:03pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360 "2017-03-03T20:03:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [March 3, 2017, 8:03pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/1 "2017-03-03T20:03:05Z")

</div>

Hi I'm new to ELK stack . Im Using ELK 5.2 and Heartbeat Version 5.2.2.

After changing the heartbeat.yml to following , i couldn't start heartbeat service. So i tried validating heartbeat.yml and i got error "Exiting: error loading config file: yaml: line 25: mapping values are not allowed in this context"

what am i doing wrong here ?

```auto
heartbeat.monitors:
- type: http

  # List or urls to query
  urls: ["http://localhost:9200"]

  # Configure task schedule
  schedule: '@every 10s'

  # Total test connection and data exchange timeout
  #timeout: 16s
  
- type: tcp
    hosts: ["localhost:8080"]
    schedule: '@every 10s'
        mode : any

```

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [March 3, 2017, 8:06pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/2 "2017-03-03T20:06:15Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b47bbad614369ddb61c0a381caba8a2da48b7565.JPG)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 5, 2017, 9:44pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/3 "2017-03-05T21:44:37Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

Can you post the entire config file? Feel free to use something like gist/pastebin/etc.

---

<div class="post-metadata">

### Author: ![dkris1](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkris1](https://discuss.elastic.co/u/dkris1)
#### Post date: [March 10, 2017, 1:53pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/4 "2017-03-10T13:53:05Z")

</div>

Sure Mark.

However after changing the format to below with out any spaces, it started working.

```auto
- type: tcp
  hosts: ["x.x.x.x:80"]
  schedule: '@every 10s'
  mode: any

```

---

<div class="post-metadata">

### Author: ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)
#### Post date: [March 10, 2017, 3:14pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/5 "2017-03-10T15:14:36Z")

</div>

That's right, it's a YAML list of maps. Yaml can be quite annoying some times.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 7, 2017, 3:14pm UTC](https://discuss.elastic.co/t/heartbeat-not-starting-when-second-monitor-is-added/77360/6 "2017-04-07T15:14:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
