# Kibana JSON input calc fields

**URL:** <https://discuss.elastic.co/t/kibana-json-input-calc-fields/227501>\
**Category:** Kibana\
**Created:** [April 10, 2020, 12:39pm UTC](https://discuss.elastic.co/t/kibana-json-input-calc-fields/227501 "2020-04-10T12:39:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin020](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@Robin020](https://discuss.elastic.co/u/Robin020)\
**Post date:** [April 10, 2020, 12:39pm UTC](https://discuss.elastic.co/t/kibana-json-input-calc-fields/227501/1 "2020-04-10T12:39:27Z")

</div>

Hi,

I use heartbeat for monitoring some url's. But unfortunately the resolving of my VPS is slow. So I would like to exclude the `resolve.rtt.us` field in a visualization.

In the visualization I use the `monitor.duration.us` field on the Y as. I try to do this calculation: `monitor.duration.us` - `resolve.rtt.us`.

`{"script" : "doc['monitor.duration.us'].value - doc['resolve.rtt.us'].value"}`

Above JSON input doesn't work. Could somebody help me with this?

Best regards,  
Robin

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [April 10, 2020, 1:05pm UTC](https://discuss.elastic.co/t/kibana-json-input-calc-fields/227501/2 "2020-04-10T13:05:21Z")

</div>

Hi @Robin020,

> [@Robin020](#):
>
> Above JSON input doesn't work. Could somebody help me with this?

Do you get a specific error message? Can you show me exactly where and how you're trying to use this script?

---

<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:** [May 8, 2020, 1:05pm UTC](https://discuss.elastic.co/t/kibana-json-input-calc-fields/227501/3 "2020-05-08T13:05:33Z")

</div>

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