# ELK stats on nginx

**URL:** <https://discuss.elastic.co/t/elk-stats-on-nginx/466>\
**Category:** Logstash\
**Created:** [May 11, 2015, 12:56am UTC](https://discuss.elastic.co/t/elk-stats-on-nginx/466 "2015-05-11T00:56:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fedeisas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fedeisas/32/44883_2.png) [@fedeisas](https://discuss.elastic.co/u/fedeisas)\
**Post date:** [May 11, 2015, 12:56am UTC](https://discuss.elastic.co/t/elk-stats-on-nginx/466/1 "2015-05-11T00:56:48Z")

</div>

Hello everyone!

I'm using an ELK stack to analyze my nginx acces logs. My grok pattern is:

```
%{IPORHOST:clientip} %{NGUSER:ident} %{NGUSER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes}|-) (?:"(?:%{URI:referrer}|-)"|%{QS:referrer}) %{QS:agent} "-" "%{NUMBER:response_time}"

```

The data is retrieved and stored within elastic search. When I try to use the stats modules of Kibana, it fails because the `bytes` field is not numeric:

```
[Facet [stats]: field [bytes] isn't a number field, but a string]

```

Is there any way to tell Logstash to store some data as `numeric`? The mapping is currently set to `string`.

Thanks!

---

<div class="post-metadata">

**Author:** ![fedeisas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fedeisas/32/44883_2.png) [@fedeisas](https://discuss.elastic.co/u/fedeisas)\
**Post date:** [May 11, 2015, 1:04am UTC](https://discuss.elastic.co/t/elk-stats-on-nginx/466/2 "2015-05-11T01:04:10Z")

</div>

Nevermind, I just found this: [https://www.elastic.co/blog/little-logstash-lessons-part-using-grok-mutate-type-data](https://www.elastic.co/blog/little-logstash-lessons-part-using-grok-mutate-type-data)

---

<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, 5:40am UTC](https://discuss.elastic.co/t/elk-stats-on-nginx/466/3 "2017-07-06T05:40:03Z")

</div>


