# Heartbeat URL changing after POST

**URL:** <https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [October 13, 2020, 4:06pm UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934 "2020-10-13T16:06:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![OracleDBA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oracledba/32/142920_2.png) [@OracleDBA](https://discuss.elastic.co/u/OracleDBA)\
**Post date:** [October 13, 2020, 4:06pm UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/1 "2020-10-13T16:06:30Z")

</div>

Hello,  
I have a heartbeat configuration such as:

```auto
- type: http
  name: CHECK-A
  id: CHECK-A
  schedule: '@every: 10s'
  urls: ["https://website/check/checkRequest.html"]
  check.request:
  method: POST
  response.include_body: always
  response.include_body_max_bytes: 2048
  headers:
  'Content-Type': 'application/x-www-form-urlencoded'
  body: "member=FO&number=123456789"
  check.response:
    status: [200]
    body:
      - Member
      - Date
      - Name
      - Address

```

Now, then this target is checked by heartbeat, the POST operation happens but the URL where the results are displayed changes to urls: ["[https://website/check/checkResponse.html](https://website/check/checkResponse.html)"]

Is there a way to indicate for heartbeat to got to the URL: ["[https://website/check/checkRequest.html](https://website/check/checkRequest.html)"]

and do the POST, but then check the reply from the URL:  
urls: ["[https://website/check/checkResponse.html](https://website/check/checkResponse.html)"]

Or is heartbeat "smart" enough to follow the URL from the landing URL through to the POST reply URL?

Many thanks,  
OracleDBA

---

<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:** [October 14, 2020, 8:08am UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/2 "2020-10-14T08:08:34Z")

</div>

I'm afraid it's not possible to follow such scenarios. It should be integrated with simpler cases like `/health` endpoints or ping-pong checks.

---

<div class="post-metadata">

**Author:** ![OracleDBA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oracledba/32/142920_2.png) [@OracleDBA](https://discuss.elastic.co/u/OracleDBA)\
**Post date:** [October 14, 2020, 8:31am UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/3 "2020-10-14T08:31:23Z")

</div>

Thanks for the advice. I've not heard of /health or ping-pong checks within Heartbeat. Do you have any references to Docs or other information on how to use those?

Cheers,  
OracleDBA

---

<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:** [October 14, 2020, 9:21am UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/4 "2020-10-14T09:21:48Z")

</div>

My point is that heartbeat is not designed to cover complex flows (consisting of multiple endpoints), but rather single endpoints (which can internally examine more complex cases or run a flow).

---

<div class="post-metadata">

**Author:** ![OracleDBA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oracledba/32/142920_2.png) [@OracleDBA](https://discuss.elastic.co/u/OracleDBA)\
**Post date:** [October 14, 2020, 10:46am UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/5 "2020-10-14T10:46:05Z")

</div>

OK, I see. Thanks for that insight. I'll continue my investigations from here, thanks for setting me on the right path.  
Cheers,  
OracleDBA

---

<div class="post-metadata">

**Author:** ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)\
**Post date:** [October 14, 2020, 11:30am UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/6 "2020-10-14T11:30:25Z")

</div>

In 7.10, you will be able to do these multi step journey using heartbeat and synthetic agent.

Also heartbeat does follow redirects, i am not sure if it checks results from the last url or the first.  
you can specify [https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html#monitor-http-max-redirects](https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html#monitor-http-max-redirects)

---

<div class="post-metadata">

**Author:** ![OracleDBA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oracledba/32/142920_2.png) [@OracleDBA](https://discuss.elastic.co/u/OracleDBA)\
**Post date:** [October 14, 2020, 12:27pm UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/7 "2020-10-14T12:27:15Z")

</div>

Awesome! Thanks that's very useful information. I'll check on that link now.

Much appreciated, Cheers  
OracleDBA

---

<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:** [November 11, 2020, 2:27pm UTC](https://discuss.elastic.co/t/heartbeat-url-changing-after-post/251934/8 "2020-11-11T14:27:26Z")

</div>

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