Heartbeat URL changing after POST

Hello,
I have a heartbeat configuration such as:

- 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"]

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

and do the POST, but then check the reply from the URL:
urls: ["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

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.

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

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).

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

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

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

Much appreciated, Cheers
OracleDBA

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