Autodiscovery Strategy for Transitioning from Heartbeat to Synthetics

Hello everyone.

The topic that brings us here is Heartbeat autodiscover. We have many deployments that are going to be modified and we need to automate the detection and creation of monitors.

The problem that is added to this is that Uptime, starting from version 8.15.0, is deprecated and the documentation recommends moving to Synthetics.

We are looking for is:

  1. To be able to do the same Heartbeat autodiscover but with Synthetics.
  2. Heartbeat is still working in version 9.4.0 Get started with Uptime | Elastic Docs — is it possible to use Heartbeat and see the monitors in the Synthetics section from that version?
  3. We saw that there is an autodiscover using standalone agents by enabling the corresponding integration; however, the Synthetics integration is not available in the list:
    Kubernetes autodiscovery with Elastic Agent | Elastic Docs
    Conditions based autodiscover | Elastic Docs
    Elastic integrations | Elastic integrations

which path do you recommend we follow?

Regards.

Hi @Cristian_Pereyra

What version are you targeting?
9.4+?

I had this working with agent + auto discover + annonations + synthetics at one point.. let me look ...

I actually had it working via annotations but that may be have been 8.18

Here is the gist with a sample yaml running as a stateful deployment

And here is the annotations I applied

Take a look... it has been a long time and I have not updated this for 9.4 but see if it makes sense.

if I have time I will see if I can make it work for 9.4