Logstash twitter input - ubuntu server

Hello
I am a newbie and I am trying to deploy an elastic stack on a server for the first time, running an ubuntu VM. Elasticsearch and Kibana are working fine, however, I am not getting any indices from logstash, doesn't seem to be working. I have previously run the logstash and elastic locally on my machine and the same configuration was working fine. My first question is where is the .conf file suppose to be placed in? as the directory is bit more confusing then it was when installed locally. is it .../usr/share/logstash/bin/ or .../etc/logstash/conf.d/?
My twitter.conf file:

input {
  twitter {
      consumer_key => "..."
      consumer_secret => "..."
      oauth_token => "..."
      oauth_token_secret => ".."
      keywords => ["london"]
      full_tweet => true
      use_samples => true
      languages => ["en"]
  }
}
output {
    elasticsearch{ }
}

when i run sudo /usr/share/logstash/bin/logstash -f twitter.conf i get an error

WARNING: Could not find logstash.yml which is typically located in $LS_HOME/conf             ig or /etc/logstash. You can specify the path using --path.settings. Continuing              using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.pr             operties. Using default config which logs errors to the console
[INFO ] 2018-03-01 18:48:40.740 [main] scaffold - Initializing module {:module_n             ame=>"fb_apache", :directory=>"/usr/share/logstash/modules/fb_apache/configurati             on"}
[INFO ] 2018-03-01 18:48:40.750 [main] scaffold - Initializing module {:module_n             ame=>"netflow", :directory=>"/usr/share/logstash/modules/netflow/configuration"}
[WARN ] 2018-03-01 18:48:41.099 [LogStash::Runner] multilocal - Ignoring the 'pi             pelines.yml' file because modules or command line options are specified
[INFO ] 2018-03-01 18:48:41.371 [LogStash::Runner] runner - Starting Logstash {"             logstash.version"=>"6.2.2"}
[INFO ] 2018-03-01 18:48:41.403 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bun             dle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] configpathloader - No conf             ig files found in path {:path=>"/home/angelika1/twitter.conf"}
[ERROR] 2018-03-01 18:48:41.414 [Ruby-0-Thread-1: /usr/share/logstash/vendor/bun             dle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/task.rb:22] sourceloader - No configur             ation found in the configured sources.

My first question is where is the .conf file suppose to be placed in? as the directory is bit more confusing then it was when installed locally. is it .../usr/share/logstash/bin/ or .../etc/logstash/conf.d/?

The latter. Never place configuration files in a bin directory.

Thank you very much for clarification, managed to make it work.

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