# Logstash getstarted

**URL:** <https://discuss.elastic.co/t/logstash-getstarted/84264>\
**Category:** Logstash\
**Created:** [May 2, 2017, 1:06pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264 "2017-05-02T13:06:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 2, 2017, 1:06pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/1 "2017-05-02T13:06:47Z")

</div>

**Hello !!**

I just install Logstach succesfully, and I want to test it with this command

**bin/logstash -e 'input { stdin { } } output { stdout {} }'**

My problem is I don't know **where can I find this folder**

**bin/logstash ???**

I am using **CentOs** and lase version of **logstash 5.3.2**

Please Help !!!!!

---

<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 3, 2017, 5:46am UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/2 "2017-05-03T05:46:06Z")

</div>

How did you install Logstash?

---

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 3, 2017, 8:48am UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/3 "2017-05-03T08:48:52Z")

</div>

I installed it from rpm file in Centos.  
I found the folder logstash 5.3.2 and I create the file logstash.conf

input { stdin { } }  
output {  
elasticsearch { hosts =\> ["localhost:9200"] }  
stdout { codec =\> rubydebug }  
}

the input **works** even I can read data from a cvs file and the output **stdout { codec =\> rubydebug }** works as well

**but** output **elasticsearch { hosts =\> ["localhost:9200"] }** doesn't work ?? doesn't send data to elasticsearch  
my elasticsearch is installed in a docker container and kibana in an other container, they are well conected to each other using a docker network, in ports 9200 , 5601  
I can't reach them from Logstash, wich is installed in the host machine Centos how can I manage this mess ?? **please help !!!**

---

<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 3, 2017, 11:16am UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/4 "2017-05-03T11:16:19Z")

</div>

But if you're running ES in a container, is it really accessible via localhost:9200? With the default network mode of containers I'd assume you'd have to use its IP address.

---

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 3, 2017, 12:09pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/5 "2017-05-03T12:09:36Z")

</div>

I didn't use any IP address, I used directly localhost:9200 and I got this result

![](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c465f6e0474aef7489d25c2237de0e85380d9de6.png)

and for Kibana I've create a docker network and I did connect both containers ES and Kibana together

but if you see that I've to use the IP address, can you please tell me how can I use it ?

---

<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 3, 2017, 12:23pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/6 "2017-05-03T12:23:24Z")

</div>

> but if you see that I've to use the IP address, can you please tell me how can I use it ?

Use the ES container's IP address instead of the localhost address. You can use the `docker inspect` command to locate the container's IP address.

---

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 3, 2017, 12:36pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/7 "2017-05-03T12:36:52Z")

</div>

You mean I've to replace localhost by the IP address ?? in the output like this

`output { elasticsearch { host => ["IP@:9200"] } stdout { codec => rubydebug } }`

**but** I tried the command docker inspect I found three deffernts IP@ i've tried the three of them but it doesn't work ??? I tried to reach ES fist from firefox IP@:9200 but it doesn,'t work

![](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1da557c59deea24fbe2e9b880a052efc49f646df.png)

---

<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 3, 2017, 1:34pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/8 "2017-05-03T13:34:35Z")

</div>

In this case the container's IP address is 172.17.0.2. Does `curl 172.17.0.2:9200` work?

---

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 3, 2017, 1:50pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/9 "2017-05-03T13:50:47Z")

</div>

no it doesn't work!!! this is what i got !!! Error

 ![](https://us1.discourse-cdn.com/elastic/original/3X/7/9/79d4151a8ef2d901e8c56710df714a06e2455c64.png)

---

<div class="post-metadata">

**Author:** ![Chemse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chemse/32/17956_2.png) [@Chemse](https://discuss.elastic.co/u/Chemse)\
**Post date:** [May 3, 2017, 1:59pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/10 "2017-05-03T13:59:48Z")

</div>

the @IP doesn't work  
but finally I got the connexion between Logstash, ES and Kibana  
it was cause of X-pack, securety assue  
I followed this link and it works 🙂  
[https://www.elastic.co/guide/en/x-pack/current/logstash.html](https://www.elastic.co/guide/en/x-pack/current/logstash.html)

---

<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 31, 2017, 2:00pm UTC](https://discuss.elastic.co/t/logstash-getstarted/84264/11 "2017-05-31T14:00:37Z")

</div>

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