# Heartbeat

**URL:** <https://discuss.elastic.co/t/heartbeat/275742>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [June 12, 2021, 11:29pm UTC](https://discuss.elastic.co/t/heartbeat/275742 "2021-06-12T23:29:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shani\_angarkadu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shani_angarkadu/32/50638_2.png) [@shani\_angarkadu](https://discuss.elastic.co/u/shani_angarkadu)\
**Post date:** [June 12, 2021, 11:29pm UTC](https://discuss.elastic.co/t/heartbeat/275742/1 "2021-06-12T23:29:20Z")

</div>

I have a json response

```auto
{
    "applications": [
        {
            "name": "APP1",
            "instances": [
                {
                    "instanceId": "app1",
                    "healthCheckUrl": "http",
                    "statusPageUrl": "url",
                    "homePageUrl": "url",
                    "status": "UP"
                }
            ]
        },
        {
            "name": "app2",
            "instances": [
                {
                    "instanceId": "idname",
                    "healthCheckUrl": "url",
                    "statusPageUrl": "url",
                    "homePageUrl": "url",
                    "status": "UP"
                }
            ]
        },}
}

```

here is my config

```auto
check.response:
    status: [200, 201]
    json:
        - description: check status
          condition:
            equals:
              status: UP
  processors:
  - decode_json_fields:
      fields: ["applications"]
      process_array: false
      max_depth: 3
      target: ""
      overwrite_keys: false
      add_error_key: true

```

I am getting error message in the heartbeat. I want to verify the status of the field status which is nested for each application and also send the whole response to elastic search .

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [June 14, 2021, 9:02am UTC](https://discuss.elastic.co/t/heartbeat/275742/2 "2021-06-14T09:02:16Z")

</div>

Hi @shani_angarkadu 🙂

Please, share the error you are getting too.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [June 14, 2021, 2:39pm UTC](https://discuss.elastic.co/t/heartbeat/275742/3 "2021-06-14T14:39:36Z")

</div>

The heartbeat json config won't work here because it doesn't understand arrays.

Heartbeat really isn't intended for this use case with multiple applications sharing an endpoint.

If you could have a URL per app, without the array (one status only in the body) heartbeat would work great.

---

<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 12, 2021, 4:40pm UTC](https://discuss.elastic.co/t/heartbeat/275742/4 "2021-07-12T16:40:03Z")

</div>

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