# Starting logstash with index provided by user from UI screen

**URL:** <https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996>\
**Category:** Logstash\
**Created:** [May 31, 2018, 8:09am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996 "2018-05-31T08:09:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesha\_Venkanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ganesha_venkanna/32/30007_2.png) [@Ganesha\_Venkanna](https://discuss.elastic.co/u/Ganesha_Venkanna)\
**Post date:** [May 31, 2018, 8:09am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996/1 "2018-05-31T08:09:03Z")

</div>

Hi,  
I understand that currently the index name is supplied in the logstash.conf,i have a requirement where,where user will supply a index name through UI and i need to run logstash with the name provided.

Or  
Can we supply the index name when starting logstash something like below.

bin\logstash -f logstash.conf -i "indexName"

Thanks  
Ganesh

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 31, 2018, 9:40am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996/2 "2018-05-31T09:40:34Z")

</div>

You can reference an environment variable in the configuration file ([https://www.elastic.co/guide/en/logstash/current/environment-variables.html](https://www.elastic.co/guide/en/logstash/current/environment-variables.html)) and set that variable when you start Logstash.

---

<div class="post-metadata">

**Author:** ![Ganesha\_Venkanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ganesha_venkanna/32/30007_2.png) [@Ganesha\_Venkanna](https://discuss.elastic.co/u/Ganesha_Venkanna)\
**Post date:** [May 31, 2018, 9:57am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996/3 "2018-05-31T09:57:16Z")

</div>

Thanks for the response,the link tells about unix machine,can you give me the command for windows machine?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 31, 2018, 11:00am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996/4 "2018-05-31T11:00:10Z")

</div>

> <https://superuser.com/questions/79612/setting-and-getting-windows-environment-variables-from-the-command-prompt>

---

<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:** [June 28, 2018, 11:00am UTC](https://discuss.elastic.co/t/starting-logstash-with-index-provided-by-user-from-ui-screen/133996/5 "2018-06-28T11:00:11Z")

</div>

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