# How to use dynamic variables in Heartbeat configuration

**URL:** https://discuss.elastic.co/t/how-to-use-dynamic-variables-in-heartbeat-configuration/380450
**Category:** Beats
**Tags:** heartbeat
**Created:** [July 25, 2025, 2:05am UTC](https://discuss.elastic.co/t/how-to-use-dynamic-variables-in-heartbeat-configuration/380450 "2025-07-25T02:05:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)
#### Post date: [July 25, 2025, 10:47am UTC](https://discuss.elastic.co/t/how-to-use-dynamic-variables-in-heartbeat-configuration/380450/2 "2025-07-25T10:47:28Z")

</div>

Hello @openapiplatform25

Welcome to the community.

I found a similar post :

> [@Set dynamic headers in every request](https://discuss.elastic.co/t/set-dynamic-headers-in-every-request/319118):
>
> Hi, We are monitoring a series of machines with heartbeat and we have a special casuistic in which we need heartbeat to send the timestamp in which the request is made, we don't care if by headers, params, or query params. Is it possible in each execution to add the dynamic timestamp to a header for example? By using javascript or elastic variables. Something like: check.request: method: GET headers: 'Content-Type': 'application/json' 'X-Heartbeat-Timestamp': {{time…

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 :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/e/5ee0e81c8d4b6f76a3a49bc9cb9d29f97e05924c.png)

Thanks!!

---

_[View the full topic](https://discuss.elastic.co/t/how-to-use-dynamic-variables-in-heartbeat-configuration/380450)._
