# Timelion variable generator

**URL:** <https://discuss.elastic.co/t/timelion-variable-generator/192779>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [July 29, 2019, 9:30pm UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779 "2019-07-29T21:30:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhruv477](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dhruv477](https://discuss.elastic.co/u/dhruv477)\
**Post date:** [July 29, 2019, 9:30pm UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779/1 "2019-07-29T21:30:05Z")

</div>

I'm trying to create a very simple anomaly detector in timelion which basically colors the graph RED when the count crosses a number threshold. For eg, if the count is above 800, it plots a fill-line graph which makes that part of the graph red.

I was wondering if there is a way I can use 'Controls' or something else where I enter a number, and then that is transferred to the timelion and is used as the new threshold.

 ![33%20PM](https://us1.discourse-cdn.com/elastic/original/3X/9/8/98b98d162836f28ad99c7ca68022067c6c150320.png)

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [July 29, 2019, 10:04pm UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779/2 "2019-07-29T22:04:53Z")

</div>

Please see the ["Track used memory" example](https://www.elastic.co/guide/en/kibana/current/timelion.html#conditional-track-memory) in the documentation. I think this will guide you to the answer.

---

<div class="post-metadata">

**Author:** ![dhruv477](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dhruv477](https://discuss.elastic.co/u/dhruv477)\
**Post date:** [July 29, 2019, 10:26pm UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779/3 "2019-07-29T22:26:08Z")

</div>

Right, I have used a few of the techniques under that section, but I still don't understand how to dynamically choose a threshold, without actually going into timelion. I was wondering if there's a way to give a number as a control on the dashboard, which gets translated into the threshold in timelion.

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [July 30, 2019, 12:16am UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779/4 "2019-07-30T00:16:09Z")

</div>

I understand now. Sorry, I don't believe this is possible.

---

<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:** [August 27, 2019, 12:16am UTC](https://discuss.elastic.co/t/timelion-variable-generator/192779/5 "2019-08-27T00:16:10Z")

</div>

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