skip to Main Content

I’m trying to run this:

input {  
    twitter {
        # add your data
        consumer_key => "shhhhh"
        consumer_secret => "shhhhh"
        oauth_token => "shhhhh"
        oauth_token_secret => "shhhhh"
        keywords => ["words"]
        full_tweet => true
    }
}
output {  
    elasticsearch_http {
        host => "shhhhh"
        index => "idx_ls"
        index_type => "tweet_ls"
    }
}

This is the error I got:

Sending Logstash's logs to /usr/local/Cellar/logstash/5.2.1/libexec/logs which is now configured via log4j2.properties
[2017-02-24T04:48:03,060][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"output", :name=>"elasticsearch_http", :path=>"logstash/outputs/elasticsearch_http", :error_message=>"NameError", :error_class=>NameError, :error_backtrace=>["/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/plugins/registry.rb:221:in `namespace_lookup'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/plugins/registry.rb:157:in `legacy_lookup'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/plugins/registry.rb:133:in `lookup'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/plugins/registry.rb:175:in `lookup_pipeline_plugin'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/plugin.rb:129:in `lookup'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/pipeline.rb:452:in `plugin'", "(eval):12:in `initialize'", "org/jruby/RubyKernel.java:1079:in `eval'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/pipeline.rb:98:in `initialize'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/agent.rb:246:in `create_pipeline'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/agent.rb:95:in `register_pipeline'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/runner.rb:264:in `execute'", "/usr/local/Cellar/logstash/5.2.1/libexec/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'", "/usr/local/Cellar/logstash/5.2.1/libexec/logstash-core/lib/logstash/runner.rb:183:in `run'", "/usr/local/Cellar/logstash/5.2.1/libexec/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'", "/usr/local/Cellar/logstash/5.2.1/libexec/lib/bootstrap/environment.rb:71:in `(root)'"]}
[2017-02-24T04:48:03,073][ERROR][logstash.agent           ] fetched an invalid config {:config=>"input {  n    twitter {n        # add your datan        consumer_key => "shhhhh"n        consumer_secret => "Shhhhhh"n        oauth_token => "shhhh"n        oauth_token_secret => "shhhhh"n        keywords => ["word"]n        full_tweet => truen    }n}noutput {  n    elasticsearch_http {n        host => "shhhhh.amazonaws.com"n        index => "idx_ls"n        index_type => "tweet_ls"n    }n}n", :reason=>"Couldn't find any output plugin named 'elasticsearch_http'. Are you sure this is correct? Trying to load the elasticsearch_http output plugin resulted in this error: Problems loading the requested plugin named elasticsearch_http of type output. Error: NameError NameError"}

I’ve tried installing elasticsearch_http but it doesnt seem to be a package. Ive also tried

logstash-plugin install logstash-input-elasticsearch
and
logstash-plugin install logstash-output-elasticsearch

which did install but got the same error.

Totally new to logstash so this might be very simple.
I am Trying to follow this https://www.rittmanmead.com/blog/2015/08/three-easy-ways-to-stream-twitter-data-into-elasticsearch/

I tried Val’s answer and got this:

[2017-02-24T05:12:45,385][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>#<URI::HTTP:0x4c2332e0 URL:http://shhhhh:9200/>, :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://sshhhhhh:9200/][Manticore::ConnectTimeout] connect timed out"}

I can go to the url and i get a response on browser and I it set open on permissions so Im not sure what the issue with that would be.

2

Answers


  1. The elasticsearch_http output is no longer alive. You need to use the elasticsearch output instead.

    elasticsearch {
        hosts => "localhost:9200"
        index => "idx_ls"
        document_type => "tweet_ls"
    }
    
    Login or Signup to reply.
  2. Just an addition to @Val’s answer. What if you have your hosts parameter without the port:

    output {        
            elasticsearch {         
                index => "idx_ls"
                document_type => "tweet_ls"
                hosts => "localhost"            
            }
    }
    

    by default ES runs on port 9200 so you don’t have to explicitly set it up.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search