How to use dynamic variables in Heartbeat configuration

Hi,

I'd like to use dynamic variables in the Heartbeat configuration, specifically for request parameters.

In our use case, the API we monitor requires a different parameter for each request. This value must be unique each time and is typically generated and stored in a database with a unique key (UK), so duplication is not allowed.

Here’s an example of what we want to achieve:

heartbeat.monitors:
  - type: http
    urls: ["http://example.com"]
    timeout: 5s
    check.request:
      headers:
        RequestKey: {{date}}

In this case, I would like the {{date}} variable to be replaced with something like 20220101000000000 at request time.

This is just a simplified example. Ideally, we want to use either:

  • built-in system variables (like timestamps),
  • or fetch values from an external file or environment.

To summarize:
Is there any built-in or supported way to inject dynamic or external variables into Heartbeat monitor configurations?

Thanks in advance!

Hello @openapiplatform25

Welcome to the community.

I found a similar post :

If you need a unique key for each document i was wondering if we can use an ingest pipeline & fingerprint processor to add unique key based on timestamp for each record like below :

Thanks!!

1 Like

Hello @Tortoise

Thank you for your answer.
There seems to be no way to use Heartbeat

As you refer to, I need to think about how to use Synthesis.
Thank you.

1 Like