# Problem configuring/using Uptime Lab

**URL:** https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906
**Category:** Elasticsearch
**Created:** [January 30, 2025, 3:45pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906 "2025-01-30T15:45:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![elasticrap](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@elasticrap](https://discuss.elastic.co/u/elasticrap)
#### Post date: [January 30, 2025, 3:45pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/1 "2025-01-30T15:45:49Z")

</div>

I am working on the Uptime lab. Item 4 states -

# Configure monitors inline

heartbeat.monitors:  
Notice there is a sample monitor of type http with id my-monitor. Comment out or delete this monitor (but leave the heartbeat.monitors line in the config file).

I received the following error - Exiting: error loading config file: yaml: line 23: did not find expected key.

I am not sure what to comment out and I do not see a solution box to guide me.

---

<div class="post-metadata">

### Author: ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)
#### Post date: [January 31, 2025, 11:18am UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/2 "2025-01-31T11:18:14Z")

</div>

@elasticrap can you please share your config file ? and which version of heartbeat are you using?

---

<div class="post-metadata">

### Author: ![elasticrap](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@elasticrap](https://discuss.elastic.co/u/elasticrap)
#### Post date: [January 31, 2025, 1:11pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/3 "2025-01-31T13:11:04Z")

</div>

Hello Shahzad , I have no idea about heartbeat as I am in the uptime lab. Item 4 below is where I am confused. I am not sure what part to comment out.

I provided a screenshot of what I did comment out and the associated error.

Thank you for your time.

# Lab 1.2 - Uptime

**Objective:**

The goal of this lab is to use Heartbeat to monitor the uptime of various services, including the Pet Clinic client and server, the MySQL database, and your Elasticsearch instance.

1. First of all, change directories into the `heartbeat` directory:

2. You will need to edit `heartbeat.yml` using a tool such as `nano` or `vi`. If you are unsure which to use, `nano` is probably the best option:

3. Within `heartbeat.yml`, locate the following section:

4. Notice there is a sample monitor of type `http` with id `my-monitor`. Comment out or delete this monitor (but leave the `heartbeat.monitors` line in the config file).

 ![image.png](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc65886de946a3fb5593f3c4db9dbdded4a68fed.png)

---

<div class="post-metadata">

### Author: ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)
#### Post date: [February 4, 2025, 3:41pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/4 "2025-02-04T15:41:49Z")

</div>

Hi @elasticrap, it looks like there is a problem with your configuration file.

Can you please share the first 30 lines of your `heartbeat.yml`, so we can check what might be missing according to the error message?

Best,  
Andre

---

<div class="post-metadata">

### Author: ![elasticrap](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@elasticrap](https://discuss.elastic.co/u/elasticrap)
#### Post date: [February 4, 2025, 10:29pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/5 "2025-02-04T22:29:22Z")

</div>

Hello Andre. The bold lines are the ones updated.  
The first bold line is my confusion. I am not sure what is to be done from -

 ![image.png](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e976990d280ebba9e961d64138694234d469621.png)

elastic@ip-172-31-4-222:~/heartbeat$ cat heartbeat.yml  
################### Heartbeat Configuration Example #########################

# This file is an example configuration file highlighting only some common options.

# The heartbeat.reference.yml file in the same directory contains all the supported options

# with detailed comments. You can use it for reference.

---

<div class="post-metadata">

### Author: ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)
#### Post date: [February 5, 2025, 1:52pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/6 "2025-02-05T13:52:02Z")

</div>

Hi @elasticrap,

You need to keep `heartbeat.monitors:` if you removed.

If you removed the example monitor called `my-monitor`, you need to make sure you still have the `heartbeat.monitors:` section in the configuration file.

Then add the new monitors to the `heartbeat.monitors:` section as described in lab instructions.

Best,  
Andre

---

<div class="post-metadata">

### Author: ![elasticrap](https://avatars.discourse-cdn.com/v4/letter/e/ce7236/32.png) [@elasticrap](https://discuss.elastic.co/u/elasticrap)
#### Post date: [February 5, 2025, 2:12pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/7 "2025-02-05T14:12:20Z")

</div>

Thank you Andre. Unfortunately I do not understand. Is there a way to talk on the phone and see exactly what I should and should not comment out to carry on with the lab request?  
Other portions of the lab show what the final version should look like. I am not sure why this one step does not do the same thing.  
As a novice to Elastic but with an Admin cert with Splunk, should I even be starting in this area or looking lower level?

---

<div class="post-metadata">

### Author: ![Andre\_Murbach\_Maidl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_murbach_maidl/32/83508_2.png) [@Andre\_Murbach\_Maidl](https://discuss.elastic.co/u/Andre_Murbach_Maidl)
#### Post date: [February 5, 2025, 2:50pm UTC](https://discuss.elastic.co/t/problem-configuring-using-uptime-lab/373906/8 "2025-02-05T14:50:56Z")

</div>

Hi @elasticrap ,

I'm sorry you are having troubles. In step 21 you can find the full configuration file. You can copy that to a brand new `heartbeat.yml` file and you should be able to start heartbeat with the configurations provided through lab instructions.

Best,  
Anre
