Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Kibana3, LogStash and ElasticSearch, all in one machine

Kibana3 works successfully when ElasticSearch is in a different machine, by setting elasticsearch: "http://different_machine_ip:9200" in config.js of Kibana3.

Now , I want to run all three of them in my local machine for testing. I'm using Windows7 and using Chrome browser. I installed Kibana 3 on Tomcat7. I started the embedded ElasticSearch from LogStash jar file. I set the ElasticSearch location to "localhost:9200" or "127.0.0.1:9200" or "computer_name:9200". When I check Kibana3 on the browser, the ElasticSearch query revealed via spying has no logstash index.

curl -XGET 'http://localhost:9200//_search?pretty' -d ''

As you can see, the index part is empty, showing // only. The expected query should look like this.

curl -XGET 'http://localhost:9200/logstash-2013.08.13/_search?pretty' -d 'Some JSON Data'

The browser is able to call ElasticSearch API successfully. Example, typing http://localhost:9200/logstash-2013.08.13/_mapping?pretty=true on the address bar returns the mapping of logstash index. This proves that there is no probelm in connecting to ElasticSearch.

The problem here is that the index is empty from Kibana query. Why is the index empty?

like image 730
Mawia Avatar asked Sep 18 '13 07:09

Mawia


1 Answers

Kibana 3 works differently from Kibana 1 and 2. It runs entirely in the browser.

The config file is read by javascript and executed in your browser, so localhost:9200 tells Kibana to look for ElasticSearch running on the laptop in front of you, not the server.

BTW - Recent versions of LogStash has Kibana bundled, so you don't have to host it independently.

like image 52
Dan Garthwaite Avatar answered Oct 30 '22 21:10

Dan Garthwaite