# Setting the User-Agent of heartbeat

**URL:** <https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806>\
**Category:** Beats\
**Tags:** curator\
**Created:** [June 26, 2020, 7:56am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806 "2020-06-26T07:56:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [June 26, 2020, 7:56am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/1 "2020-06-26T07:56:22Z")

</div>

Is there a way to set override the user-agent of heartbeat?  
The default one is "Go-http-client/1.1" I want to change that to "heartbeat".

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 26, 2020, 9:15am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/2 "2020-06-26T09:15:10Z")

</div>

I think this has been already pushed: [https://github.com/elastic/beats/issues/10170](https://github.com/elastic/beats/issues/10170)

Which version are you using?

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [June 26, 2020, 11:01am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/3 "2020-06-26T11:01:35Z")

</div>

I am using 7.4.2 but is there a way to setup the header within a configuration with a custom name?  
heartbeat is a relative common name for other heartbeat services in the wild. Or a custom name for the given platform/web-application/servername to be able to whitelist for the servers

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 26, 2020, 11:06am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/4 "2020-06-26T11:06:19Z")

</div>

Did you try with `check.headers`? See: [https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html](https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html)

header "User-Agent"

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [June 26, 2020, 11:12am UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/5 "2020-06-26T11:12:19Z")

</div>

Yeah that worked out, the outcome in the end was.

```
check.request:
  headers:
    'User-Agent': 'heartbeat'
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 24, 2020, 1:12pm UTC](https://discuss.elastic.co/t/setting-the-user-agent-of-heartbeat/238806/6 "2020-07-24T13:12:21Z")

</div>

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