# Running out of hope with Timelion

**URL:** https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848
**Category:** Kibana
**Tags:** timelion
**Created:** [April 26, 2020, 1:36pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848 "2020-04-26T13:36:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![LauriHu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laurihu/32/48432_2.png) [@LauriHu](https://discuss.elastic.co/u/LauriHu)
#### Post date: [April 26, 2020, 1:36pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/1 "2020-04-26T13:36:15Z")

</div>

Im trying to visualize my data with Timelion for the first time and its just showing me straight line at value 0. I have chaged the timestamp value in advanced setting and tried all the tricks but nothing seems to work. My code looks like this:  
`.es(index=jira_issues_elk*,metric=count,timefield=UPDATED_UTC).points()`  
The timefield value UPDATED\_UTC is a date type that is a scripted field in index pattern.

Anyone know a solution here?

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [April 27, 2020, 6:56am UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/2 "2020-04-27T06:56:24Z")

</div>

Timelion doesn't know about scripted fields. To use timelion, the fields have to be present in the index. You can do this by calculating the scripts value at ingest time, for example with an ingest pipeline configured in Elasticsearch and the [script processor](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/script-processor.html).

---

<div class="post-metadata">

### Author: ![LauriHu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laurihu/32/48432_2.png) [@LauriHu](https://discuss.elastic.co/u/LauriHu)
#### Post date: [April 27, 2020, 3:38pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/3 "2020-04-27T15:38:28Z")

</div>

Thanks for the reply! Your reply still left some questions. Do you have any link to a guide on how to do this?

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [April 27, 2020, 3:50pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/4 "2020-04-27T15:50:58Z")

</div>

This page shows how pipelines work in general [https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html)

Define a pipeline with a script processor that does the calculation you are currently doing in your scripted field.

Then ingest your data through the pipeline. Now timelion will now about `UPDATED_UTC` field because it will be part of the regular document.

---

<div class="post-metadata">

### Author: ![LauriHu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/laurihu/32/48432_2.png) [@LauriHu](https://discuss.elastic.co/u/LauriHu)
#### Post date: [April 27, 2020, 4:37pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/5 "2020-04-27T16:37:31Z")

</div>

I was trying to figure this out but couldnt get it yet. I have data coming from Kafka to elasticsearch. Is it somehow possible to use ingest pipeline to add this timestamp before it reaches the index?

---

<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: [May 25, 2020, 4:37pm UTC](https://discuss.elastic.co/t/running-out-of-hope-with-timelion/229848/6 "2020-05-25T16:37:46Z")

</div>

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