Logstash Twitter输入股票代码

时间:2015-05-19 11:50:13

标签: twitter logstash

我似乎无法在logstash twitter输入上使用Twitter股票代码。如果我尝试使用$符号

,则会抛出异常
input {
 twitter {
        # add your data
        consumer_key => "*******************"
        consumer_secret => "*******************"
        oauth_token => "***********************"
        oauth_token_secret => "***********************"
        keywords => ["AAPL"]
        full_tweet => true
    }
}

我只需要在关键字

中过滤与股票相关的推文

keywords => ["$AAPL"]

如果我尝试在$

中使用keywords符号,则会显示在我的控制台中

5/lib/logstash/inputs/twitter.rb:88:in `run'", "/home/user11/opt/tools/logstash-1.5.0.rc2/lib/logstash/pipeline.rb:174:in `inputworker'", "/home/user11/opt/tools/logstash-1.5.0.rc2/lib/logstash/pipeline.rb:168:in `start_input'"], :level=>:warn} {:exception=>Twitter::Error::Unauthorized, :backtrace=>["/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/response.rb:21:in `on_headers_complete'", "org/ruby_http_parser/RubyHttpParser.java:370:in `<<'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/response.rb:16:in `<<'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/connection.rb:22:in `stream'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/client.rb:116:in `request'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/twitter-5.12.0/lib/twitter/streaming/client.rb:36:in `filter'", "/home/user11/opt/tools/logstash-1.5.0.rc2/vendor/bundle/jruby/1.9/gems/logstash-input-twitter-0.1

有解决方法吗?

0 个答案:

没有答案