# Status field in JSON filter must be numeric not string

**URL:** <https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304>\
**Category:** Logstash\
**Created:** [July 25, 2016, 2:57pm UTC](https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304 "2016-07-25T14:57:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriswood123](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@chriswood123](https://discuss.elastic.co/u/chriswood123)\
**Post date:** [July 25, 2016, 2:57pm UTC](https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304/1 "2016-07-25T14:57:49Z")

</div>

Logstash version: 1.5.4

When passing parseable JSON to logstash where the field "status" is a string I get the error "failed action with response of 400, dropping action".

Passing the "status" field as a numeric type (integer or float) I get no such error and the log makes it in to elasticsearch.

I can see why you would expect HTTP status codes to be numeric (integer specifically) but I think this is a bug as a field with such a generic name as "status" should not be only considered a numeric value in such a generic filter as JSON. In fact it shouldn't drop any JSON that correctly parses.

Thoughts?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 27, 2016, 5:02am UTC](https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304/2 "2016-07-27T05:02:10Z")

</div>

What do your ES logs show?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [July 30, 2016, 9:41am UTC](https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304/3 "2016-07-30T09:41:41Z")

</div>

The problem has nothing to do with the json filter. It's most likely ES's mapping of the status field.

---

<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, 4:45am UTC](https://discuss.elastic.co/t/status-field-in-json-filter-must-be-numeric-not-string/56304/4 "2017-07-06T04:45:46Z")

</div>


