Configuring heartbeat for different environments

Hello,
I am using heartbeat to check of various services on the environments however I can see that the environments are configured after the heartbeat_monitors. Is that any way I can add multiple environments each with it's own heartbeat monitors in one server/config file? I would expect something like this:

heartbeat_monitors:
  - type: tcp
    hosts: ...
   ..
fields:
  env: production

heartbeat_monitors:
  - type: tcp
    hosts: ...
   ..
fields:
  env: staging

...

Thanks inadvance for you help.

For doing this you will need the most recent heartbeat released with elastic stack rc1. This release adds support to add fields, tags and even local processors to individual monitors. Note, the event format was changed (for good) + including some enhancements in the HTTP event generation.

Using this release you can configure heartbeat like this:

heartbeat.monitors:
- type: tcp
  hosts: ...
  fields.env: production

- type: tcp
  hosts: ...
  fields.env: staging

OK my question is if I install this rc1 version of heartbeat can I later on when it will be released get back to the stable version and have it still working?

Regards,
Peter

With rc1 out, only critical bug-fixes will be applied before GA. The feature-set of heartbeat is fixed until release.

Please note heartbeat in general is still in beta (even with upcoming elastic stack release). Check out the Heartbeat to GA Roadmap.

This topic was automatically closed after 21 days. New replies are no longer allowed.