Hi
I want to pull tweets matching particular keywords into ELK, adding a field to show what was matched. I can do this, but solution does not scale and I think there is likely a better way.
Here's my conf files, I think intent is self explanatory.
input {
twitter {
# add your data
consumer_key => "xx"
consumer_secret => "xx"
oauth_token => "xx-xx"
oauth_token_secret => "xx"
keywords => ["london"]
full_tweet => true
add_field => { "myplace" => "london" }
}
}
input {
twitter {
# add your data
consumer_key => "xx"
consumer_secret => "xx"
oauth_token => "xx-xx"
oauth_token_secret => "xx"
keywords => ["paris"]
full_tweet => true
add_field => { "myplace" => "paris" }
}
}
output {
elasticsearch {
index => "twitter-%{+YYYY.MM.dd}"
}
}
I was using if condition on output to output into different indices, but that has same problem.
Once I get over 2 or so input sections, my logs fill up with
[WARN ][logstash.inputs.twitter ] Twitter too many requests error, sleeping for 300s
which is a message I understand but
- I don't see how I can control/stop this from my end
and
- I don't see a better way than the above.
Thanks for suggestions,
RT