# JSON Input scripts

**URL:** https://discuss.elastic.co/t/json-input-scripts/44377
**Category:** Kibana
**Created:** [March 14, 2016, 11:15pm UTC](https://discuss.elastic.co/t/json-input-scripts/44377 "2016-03-14T23:15:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [March 14, 2016, 11:15pm UTC](https://discuss.elastic.co/t/json-input-scripts/44377/1 "2016-03-14T23:15:42Z")

</div>

First:  
According to [the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current//modules-scripting.html#enable-dynamic-scripting) the default settings for scripting on an elasticsearch node are:

```auto
script.inline: sandbox
script.indexed: sandbox
script.file: true

```

That means that I don't have to reconfigure my ES node in order to use the JSON Input field, correct?

If that is true, how do I actually use that field? From [these docs](https://www.elastic.co/guide/en/kibana/current/metric-chart.html) something like `{ "script" : "count * 100" }` should cause the value of a metric visualization to add a couple zeros on the end.

In my tests, that does not happen.

What am I missing?

As for what my end goal is: I want to get the time between the last two log entries timestamps. Then show "OK" if it is less than some value, and "BAD" if it is greater than some value. Any tips on how to get that? Does it need scripting?

---

<div class="post-metadata">

### Author: ![stormpython](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stormpython/32/7190_2.png) [@stormpython](https://discuss.elastic.co/u/stormpython)
#### Post date: [March 15, 2016, 12:22am UTC](https://discuss.elastic.co/t/json-input-scripts/44377/2 "2016-03-15T00:22:23Z")

</div>

For your first question, as far as the script goes, you need to specify the field you want to manipulate. For example: `{ "script": doc['fieldname'].value * 100 }`.

I am not sure how to solve your second question.

---

<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 6, 2017, 1:59pm UTC](https://discuss.elastic.co/t/json-input-scripts/44377/3 "2017-07-06T13:59:10Z")

</div>


