# Date\_histogram facet float possible overflow

**URL:** <https://discuss.elastic.co/t/date-histogram-facet-float-possible-overflow/19425>\
**Category:** Elasticsearch\
**Created:** [August 24, 2014, 2:04pm UTC](https://discuss.elastic.co/t/date-histogram-facet-float-possible-overflow/19425 "2014-08-24T14:04:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moshe\_zada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moshe_zada/32/53780_2.png) [@moshe\_zada](https://discuss.elastic.co/u/moshe_zada)\
**Post date:** [August 24, 2014, 2:04pm UTC](https://discuss.elastic.co/t/date-histogram-facet-float-possible-overflow/19425/1 "2014-08-24T14:04:27Z")

</div>

HI all,

I am using ELK stack to visualising our monitoring data, yesterday i came  
across a weird problem: ElasticSearch date\_histogram facet returned  
floating results that look like an overflow ("min" : 4.604480259023595_E_  
18).  
Our dataflow is : collectd (cpu/memory) -\> sends it to riemann -\> logstash  
-\> elasticsearch

At first the values were correct, after a few days the values became huge  
(see attached snapshot of kibana graph)

_filtered query + Result:_

_query:_  
url -XGET '[http://localhost:9200/logstash-2014.08.24/\_search?pretty](http://localhost:9200/logstash-2014.08.24/_search?pretty)' -d '{  
"query": {  
"filtered": {  
"query": {  
"bool": {  
"should": [  
{  
"query\_string": {  
"query":  
"subservice.raw:"processes-cpu\_percent/gauge-collectd" AND  
(plugin\_instance:"cpu\_percent")"  
}  
}  
]  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"range": {  
"@timestamp": {  
"from": 1408884312966,  
"to": 1408884612966  
}  
}  
},  
{  
"range": {  
"@timestamp": {  
"from": 1408884311948,  
"to": 1408884327941  
}  
}  
},  
{  
"fquery": {  
"query": {  
"query\_string": {  
"query":  
"subservice:("processes-cpu\_percent/gauge-collectd")"  
}  
},  
"\_cache": false  
}  
}  
]  
}  
}  
}  
},  
"size": 500,  
"sort": [  
{  
"metric": {  
"order": "desc",  
"ignore\_unmapped": false  
}  
},  
{  
"@timestamp": {  
"order": "desc",  
"ignore\_unmapped": false  
}  
}  
]  
}'

_result:_  
{  
"took" : 47,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 2,  
"max\_score" : null,  
"hits" : [ {  
"\_index" : "logstash-2014.08.24",  
"\_type" : "gauge",  
"\_id" : "SlzG8bGJQziU0LMoN7nrbQ",  
"\_score" : null,  
"\_source":{"host":"host1","service":  
"instance-2014-08-24T1106/processes-cpu\_percent/gauge-collectd","state":null  
,"description":null,"metric":0.7,"tags":["collectd"],"time":  
"2014-08-24T12:45:25.000Z","ttl":20.0,"type":"gauge","source":"host1",  
"ds\_type":"gauge","plugin\_instance":"cpu\_percent","ds\_name":"value",  
"type\_instance":"collectd","plugin":"processes","ds\_index":"0","@version":  
"1","@timestamp":"2014-08-24T12:45:15.079Z"},  
"sort" : [4604480259023595110, 1408884325088]

```
}, {

  "_index" : "logstash-2014.08.24",
  "_type" : "gauge",
  "_id" : "8hxToMjpQ5WQIw15DQqIGA",
  "_score" : null,
  "_source":{"host":"host1","service":

```

"instance-2014-08-24T1106/processes-cpu\_percent/gauge-collectd","state":null  
,"description":null,"metric":0.5,"tags":["collectd"],"time":  
"2014-08-24T12:45:15.000Z","ttl":20.0,"type":"gauge","source":"host1",  
"ds\_type":"gauge","plugin\_instance":"cpu\_percent","ds\_name":"value",  
"type\_instance":"collectd","plugin":"processes","ds\_index":"0","@version":  
"1","@timestamp":"2014-08-24T12:45:15.079Z"},  
"sort" : [4602678819172646912, 1408884315079]  
} ]  
}  
}

_date histogram Facet + Results:query:_  
curl -XGET '[http://localhost:9200/logstash-2014.08.24/\_search?pretty](http://localhost:9200/logstash-2014.08.24/_search?pretty)' -d '{  
"facets": {  
"0": {  
"date\_histogram": {  
"key\_field": "@timestamp",  
"value\_field": "metric",  
"interval": "1s"  
},  
"global": true,  
"facet\_filter": {  
"fquery": {  
"query": {  
"filtered": {  
"query": {  
"query\_string": {  
"query":  
"subservice.raw:"processes-cpu\_percent/gauge-collectd" AND  
(plugin\_instance:cpu\_percent) AND \*"  
}  
},  
"filter": {  
"bool": {  
"must": [  
{  
"range": {  
"@timestamp": {  
"from": 1408884199622,  
"to": 1408884499623  
}  
}  
},  
{  
"range": {  
"@timestamp": {  
"from": 1408884311948,  
"to": 1408884327941  
}  
}  
},  
{  
"fquery": {  
"query": {  
"query\_string": {  
"query":  
"subservice:("processes-cpu\_percent/gauge-collectd")"  
}  
},  
"\_cache": true  
}  
}  
]  
}  
}  
}  
}  
}  
}  
}  
},  
"size": 0  
}'

_result:_  
{  
"took" : 24,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1197141,  
"max\_score" : 0.0,  
"hits" : []  
},  
"facets" : {  
"0" : {  
"\_type" : "date\_histogram",  
"entries" : [ {  
"time" : 1408884315000,  
"count" : 1,  
"min" : 4.6026788191726469E18,  
"max" : 4.6026788191726469E18,  
"total" : 4.6026788191726469E18,  
"total\_count" : 1,  
"mean" : 4.6026788191726469E18  
}, {  
"time" : 1408884325000,  
"count" : 1,  
"min" : 4.604480259023595E18,  
"max" : 4.604480259023595E18,  
"total" : 4.604480259023595E18,  
"total\_count" : 1,  
"mean" : 4.604480259023595E18  
} ]  
}  
}  
}

Regards,  
Moshe

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/44f54a8a-d3c8-4ea1-8050-71c5d029c409%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/44f54a8a-d3c8-4ea1-8050-71c5d029c409%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:06am UTC](https://discuss.elastic.co/t/date-histogram-facet-float-possible-overflow/19425/2 "2017-07-06T01:06:49Z")

</div>


