Hello !
Ive been trying to migrate the data from a mysql database into elasticsearch using LOGSTASH But not working.
Both Elasticsearch and kibana are running and i created the logstash config file in /etc/logstash/conf.d
With the following settings :
echo "input {
jdbc {
jdbc_driver_library => "/etc/logstash/mysql-connector-java-5.1.43"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/homestead"
jdbc_user => "homestead"
jdbc_password => "secret"
statement => "SELECT name FROM users"
}
}
output {
elasticsearch {
action => "index"
hosts => ["your_host"]
index => "your_index"
document_type => "your_type"
}
}
" >> /etc/logstash/conf.d/mystash.conf
Whenever i try to run the the command from /usr/share/logstash/bin as : logstash -f mystash.conf
Getting error : -bash: logstash: command not found
Anyone has an idea how to do this ?
PLease help ! Its frustrating af.