# Getting started with Logstash 2.2

**URL:** <https://discuss.elastic.co/t/getting-started-with-logstash-2-2/45350>\
**Category:** Logstash\
**Created:** [March 24, 2016, 1:26pm UTC](https://discuss.elastic.co/t/getting-started-with-logstash-2-2/45350 "2016-03-24T13:26:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [March 24, 2016, 1:26pm UTC](https://discuss.elastic.co/t/getting-started-with-logstash-2-2/45350/1 "2016-03-24T13:26:47Z")

</div>

Hi ,

I worked with logstash-1.4.2 and now I'm upgrading to logstash 2.2.  
My conf file in version 1.4.2 is:

input {  
file{  
path =\> ["/tmp/31.json"]  
type =\> "json"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}

filter{  
json {  
source =\> "message"  
}  
}

filter{  
date {  
match =\> ["startTime", "UNIX\_MS"]  
target =\> "@timestamp"  
}  
}

output {  
stdout {  
codec =\> rubydebug  
}  
elasticsearch {  
host =\> "ilautomation"  
protocol =\> "http"  
index =\> "index\_client"  
}  
}

In logstash 2.2 I can run this file like this:

input {  
file{  
path =\> ["/tmp/31.json"]  
type =\> "json"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}

filter{  
json {  
source =\> "message"  
}  
}

filter{  
date {  
match =\> ["startTime", "UNIX\_MS"]  
target =\> "@timestamp"  
}  
}

output {  
stdout {  
codec =\> rubydebug  
}  
elasticsearch {  
}

How I can define to which index to upload my data ?

BR,  
Chen

---

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [March 24, 2016, 1:47pm UTC](https://discuss.elastic.co/t/getting-started-with-logstash-2-2/45350/2 "2016-03-24T13:47:54Z")

</div>

If you change the part of elasticsearch to:  
elasticsearch {  
hosts =\> localhost  
index =\> index\_client  
}

it works !!!

---

<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, 5:05am UTC](https://discuss.elastic.co/t/getting-started-with-logstash-2-2/45350/3 "2017-07-06T05:05:31Z")

</div>

Closed on July 6, 2017, 5:05am UTC


