# Multiple Heartbeat In One Windows Server

**URL:** https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249
**Category:** Beats
**Tags:** heartbeat
**Created:** [June 2, 2022, 3:02pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249 "2022-06-02T15:02:30Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Nicole1](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Nicole1](https://discuss.elastic.co/u/Nicole1)
#### Post date: [June 2, 2022, 3:02pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/1 "2022-06-02T15:02:30Z")

</div>

can we have multiple heartbeats in one windows server because we want to monitor 3 different series of endpoints(appcodes).with 3 different heartbeat.yml

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 2, 2022, 3:21pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/2 "2022-06-02T15:21:48Z")

</div>

You can, if each heartbeat uses different configs and data folders, you would just need to create a service for each one of them.

But, what do you need to run that you need to use 3 different agents? Can you share the `heartbeat.yml` files?

---

<div class="post-metadata">

### Author: ![Nicole1](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Nicole1](https://discuss.elastic.co/u/Nicole1)
#### Post date: [June 2, 2022, 7:31pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/3 "2022-06-02T19:31:06Z")

</div>

Thank you for your respond.  
we want to monitor 3 different app codes pcf services send all the logs to logstash and eventually create dashboard for that.  
we do not want to run 3 heartbeat in 3 different servers  
heartbeat.yml(which include the logstash connection)

 ![heartbeat-yml](https://us1.discourse-cdn.com/elastic/original/3X/8/2/82cfa52e5a3756173b96c59abc6aa33922436367.png)  
 ![monitors.d](https://us1.discourse-cdn.com/elastic/original/3X/b/6/b69404fa823f6a11b915d43cf5d9d2683694adf2.png)

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 2, 2022, 9:23pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/4 "2022-06-02T21:23:00Z")

</div>

You need to share your entire `heartbeat.yml` as plain text, use the `</>` button.

Also share each service yml configuration file.

If you want to monitor 3 (or more) different apps you do not need to run multiple heartbeats, you can just run one heartbeat service and configure the monitors.

You can configure the monitors directly in the `heartbeat.yml` file, which is the service configuration file, or you can configure the monitors in external files in a specific folder and configure heartbeat to look into that folder.

Check this part of the [documentation](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#configuration-heartbeat-options).

---

<div class="post-metadata">

### Author: ![Nicole1](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Nicole1](https://discuss.elastic.co/u/Nicole1)
#### Post date: [June 2, 2022, 10:02pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/5 "2022-06-02T22:02:09Z")

</div>

heartbeat.yml

heartbeat.config.monitors:  
path: ${path.config}/monitors.d/\*.yml  
reload.enabled: true  
reload.period: 5s  
output.logstash:  
hosts: [".rbc.com:30113"]

---

<div class="post-metadata">

### Author: ![Nicole1](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@Nicole1](https://discuss.elastic.co/u/Nicole1)
#### Post date: [June 2, 2022, 10:17pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/6 "2022-06-02T22:17:14Z")

</div>

C:\Program Files\Heartbeat\monitors.d\N400-PCF-HTTP.yml

- type: http  
enabled: true  
id: N400-CIS5xReadAPI-pcf  
name: N400 CIS5X Read API Service  
hosts: ["https://-fg.rbc.com/health.html"]  
check.response.status: [200]  
schedule: '@every 1m'  
fields\_under\_root: true  
fields:  
app: N400
- type: http  
enabled: true  
id: N400-ciswriteservice-pcf  
name: N400 CIS Write Service  
hosts: ["-.fg.rbc.com/health.html"]  
check.response.status: [200]  
schedule: '@every 1m'  
fields\_under\_root: true  
fields:  
app: N400
- type: http  
enabled: true  
id: N400-ciswritesrv-pcf  
name: N400 CIS Writesrv Service  
hosts: ["-.fg.rbc.com/health.html"]  
check.response.status: [200]  
schedule: '@every 1m'  
fields\_under\_root: true  
fields:  
app: N400

In monitors.d I have 3 config file for different app code  
NV00-PCF-HTTP.yml  
U690-PCF-HTTP.yml  
now everything(all 3 app code) is running from one server and we can see the logs in elastic which sent from logstash  
The only issue is running heartbeat as a service

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [June 2, 2022, 10:47pm UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/7 "2022-06-02T22:47:57Z")

</div>

Did you follow the instructions in the [documentation](https://www.elastic.co/guide/en/beats/heartbeat/current/heartbeat-installation-configuration.html#installation) ?

You need to run the powershell script to install the service.

```auto
PS > cd 'C:\Program Files\Heartbeat'
PS C:\Program Files\Heartbeat> .\install-service-heartbeat.ps1

```

---

<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: [July 1, 2022, 12:48am UTC](https://discuss.elastic.co/t/multiple-heartbeat-in-one-windows-server/306249/8 "2022-07-01T00:48:21Z")

</div>

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