Multiple Heartbeat In One Windows Server

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

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?

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)


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.

heartbeat.yml

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

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

Did you follow the instructions in the documentation ?

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

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

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