Display response body of Heartbeat in Kibana Uptime

Dear Elastic-Team,

in Heartbeat I am calling the actuator (info) endpoints to verify if the services are running. The endpoints are responding with a json body that includes the version of the service. I would want to display this version field in Kibana Uptime for each service. Is this possible or would I have to go with HTTP beat and create a seperate Dashboard for this?

Thank you in advance

Heartbeat by default only records the body for errors, but you can have it record it every time. See HTTP response docs.

Thanks, thats what I am looking for. Is it possible displaying the body or parts of the body in Uptime though?

No. There are a number of issues with rendering arbitrary HTML from other sites (security aside, it often just doesn't work), and the fact that Heartbeat by default only captures the first 1024k. Can you share your use case? Why would you like the HTML rendered?

The main use case for the body is to look at detailed errors.

It's not HTML, it's JSON. We develop in microservices and each of them has an endpoint (Spring actuator endpoint) that returns info on the version, build time and git info in a JSON. It would be really nice to display this info like in another column in Uptime for each service so you can also check if the services have the right version and so on next to if they are running. But if that doesnt work I guess the way to go then would be with HTTPbeat and a seperate dashboard in Kibana right?

@sbienert uptime does display body for each ping in details page, go to ping list and expand the row and you will see body if you are recording it

example config i used

  - type: http
    id: ir-elastic-co
    name: Elastic Investor Relations
    urls: ["https://ir.elastic.co/home/default.aspx"]
    schedule: "@every 60s"
    tags: ["org:elastic"]
    response.include_body_max_bytes: 99999
    response.include_body: always
        - Latestttt

here is the docs explaining all hearbeat options https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-http-options.html

Hey, can it be thoug, that the body is only shown, when there is a body mismatch? Why is that the case? I have

     response.include_body_max_bytes: 99999
        response.include_body: always

included in my config, but it's not showing in Uptime.

Aah I see it's in the details view of the monitor. okay sorry, a bit more laborious but that's basically what I want. Thank you :slight_smile:

@sbienert I am glad to hear that. Feel free to open any suggestion, feedback on using uptime app in our repo


We will appreciate it :slight_smile:

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