Repository URL to install this package:
|
Version:
0.6.1 ▾
|
| gemfiles |
| lib |
| test |
| .gitignore |
| .rvmrc |
| .travis.yml |
| Appraisals |
| Gemfile |
| LICENSE.txt |
| README.md |
| Rakefile |
| fluent-plugin-twitter.gemspec |

Fluentd Input/Output plugin to process tweets with Twitter Streaming API.
before use, install dependent library as:
# for RHEL/CentOS (eventmachine requires build dependency)
$ sudo yum -y install gcc gcc-c++ openssl-devel libcurl libcurl-devel
# for Ubuntu/Debian (eventmachine requires build dependency)
$ sudo apt-get install build-essential libssl-dev
install with gem or fluent-gem command as:
# for fluentd
$ gem install eventmachine
$ gem install fluent-plugin-twitter
# for td-agent
$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install eventmachine
$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-twitter -v 0.6.0
# for td-agent2
$ sudo td-agent-gem install eventmachine
$ sudo td-agent-gem install fluent-plugin-twitter -v 0.6.0
It require td-agent2 (fluentd v0.12) to use keyword with hashtag.
<source>
@type twitter
consumer_key YOUR_CONSUMER_KEY # Required
consumer_secret YOUR_CONSUMER_SECRET # Required
access_token YOUR_ACCESS_TOKEN # Required
access_token_secret YOUR_ACCESS_TOKEN_SECRET # Required
tag input.twitter.sampling # Required
timeline tracking # Required (tracking or sampling or location or userstream)
keyword 'Ruby,Python,#fleuntd' # Optional (keyword has priority than follow_ids)
follow_ids 14252,53235 # Optional (integers, not screen names)
locations 31.110283, 129.431631, 45.619283, 145.510175 # Optional (bounding boxes; first pair specifies longitude/latitude of southwest corner)
lang ja,en # Optional
output_format nest # Optional (nest or flat or simple[default])
flatten_separator _ # Optional
</source>
<match input.twitter.sampling>
@type stdout
</match>
$ tail -f /var/log/td-agent/td-agent.log
<source>
@type http
port 8888
</source>
<match notify.twitter>
@type twitter
consumer_key YOUR_CONSUMER_KEY
consumer_secret YOUR_CONSUMER_SECRET
access_token YOUR_ACCESS_TOKEN
access_token_secret YOUR_ACCESS_TOKEN_SECRET
</match>
$ curl http://localhost:8888/notify.twitter -F 'json={"message":"foo"}'
http://pocketstudio.jp/log3/2012/02/12/how_to_get_twitter_apikey_and_token/
http://qiita.com/items/fe4258b394190f23fece
patches welcome!
Copyright © 2012- Kentaro Yoshida (@yoshi_ken)
Apache License, Version 2.0