I have no connection to elastisearch logstash

Hello everyone I have a problem I can not connect the logstash to elastisearch even tell me the logstash that the configuration is ok and starts perfect, but I do not see myself or elasticsearch or Kibana , here I leave my settings and versions. Install the plug elasticsearch_java .

input {
file {
path => "/home/rack/table.csv"
start_position => "beginning"
}
}
output {
elasticsearch_java {
action => "index"
network_host => "localhost:9200"
index => "stock"
workers => 1
}
stdout {}
}

Elasticsearch versions are 2.3.1 , 2.3.1 and Kibana 4.5.0 logstash
Thanks hopefully help.

network_host => "localhost:9200"

Two problems here:

  • network_host shouldn't contain a port number.
  • Port 9200 is used for HTTP and not the native protocol that typically uses port 9300.

Why use the elasticsearch_java output rather than the default elasticsearch one that uses HTTP?

1 Like

This is the result with that output but does not show me anything in the Kibana

output {
elasticsearch {
action => "index"
hosts => "localhost:9200"
index => "stock"
workers => 1
}
stdout {}
}

rack@rack-Specified:~/logstash-2.3.1$ bin/logstash -f /home/rack/logstash-2.3.1/logstash.conf
Settings: Default pipeline workers: 2
Pipeline main started

That's most likely because Logstash is tailing the input file. Make sure you understand sincedb and how the file input tracks the current position in the files. Comment out the elasticsearch output until you've verified that Logstash is actually reading the data.

Magnus Sorry if I upset a lot, but I earned every attempt , consult you index a table as an .xls file Exel to logstash or directly in elasticsearch , thank you for your answers.

consult you index a table as an .xls file Exel to logstash or directly in elasticsearch

I don't understand what you're saying.

sorry my English is poor. What would be the code to enter an .xls or .csv file to logstash? Or how should I put it into elasticsearch?

Logstash has no native support for reading Excel files. To read CSV files, use a file input and a csv filter.