# Timelion es() metric: field data is disabled on text fields

**URL:** <https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [November 13, 2017, 8:19pm UTC](https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458 "2017-11-13T20:19:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lidavid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lidavid/32/23531_2.png) [@lidavid](https://discuss.elastic.co/u/lidavid)\
**Post date:** [November 13, 2017, 8:19pm UTC](https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458/1 "2017-11-13T20:19:15Z")

</div>

Hey,  
I have log file that i am trying to index and plot the data with timelion.  
When i am trying to do a query with es() and use the metric field on one of my data fields i get this error:

 ![Screenshot from 2017-11-13 21-37-00](https://us1.discourse-cdn.com/elastic/original/3X/6/c/6c0fba56e4561ed43c242cb6c42ba98fd8e3c6ce.png)

I dont understand how should i index the data in order to be able to use it as a metric.  
Here is some example line from my log file :

> 1510518652 5 6 7  
> 1510518660 5 6 7  
> 1510518670 10 15 20  
> 1510518675 10 15 20

I use filebeat and logstash to index this log file. My logstash.conf looks like:

> input {  
> beats {  
> port =\> "5043"  
> }  
> }  
> filter {  
> grok {  
> match =\> {"message" =\> "%{NUMBER:epoch} %{NUMBER:x} %{NUMBER:y} %{NUMBER:z}"}  
> }  
> date {  
> match =\> ["epoch", "UNIX"]  
> }  
> }  
> output {  
> stdout { codec =\> rubydebug }  
> elasticsearch {  
> hosts =\> ["elasticsearch:9200"]  
> user =\> elastic  
> password =\> changeme  
> }  
> }

And here is an example of the indexed data:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/9/a9dacff3da99bcafb5fabdd0d3abf393ba456334.png)

Can you please point me on any thing that will help me to use x,y,z as a metric when i am doing es() query with timelion ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [November 13, 2017, 9:27pm UTC](https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458/2 "2017-11-13T21:27:49Z")

</div>

@lidavid if you go to Management -\> Index Patterns in Kibana, and select your Index Pattern,  
do you see "string" in the "type" column for x, y, and z? If so, I'd recommend to start by reading [https://www.elastic.co/blog/logstash\_lesson\_elasticsearch\_mapping](https://www.elastic.co/blog/logstash_lesson_elasticsearch_mapping) which explains how to specify the Elasticsearch mappings with Logstash and the grok filter to index these values as numbers, which can then be used in aggregations.

---

<div class="post-metadata">

**Author:** ![lidavid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lidavid/32/23531_2.png) [@lidavid](https://discuss.elastic.co/u/lidavid)\
**Post date:** [November 14, 2017, 8:03pm UTC](https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458/3 "2017-11-14T20:03:47Z")

</div>

That Really helped me. Thank you !!

---

<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:** [December 12, 2017, 8:04pm UTC](https://discuss.elastic.co/t/timelion-es-metric-field-data-is-disabled-on-text-fields/107458/4 "2017-12-12T20:04:04Z")

</div>

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