Giter Site home page Giter Site logo

yuki-takeichi / fluent-plugin-twitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from y-ken/fluent-plugin-twitter

0.0 2.0 0.0 149 KB

Fluentd Input/Output plugin to process tweets with Twitter Streaming API.

Home Page: https://rubygems.org/gems/fluent-plugin-twitter

License: Other

Ruby 100.00%

fluent-plugin-twitter's Introduction

fluent-plugin-twitter Build Status

Component

Fluentd Input/Output plugin to process tweets with Twitter Streaming API.

Dependency

before use, install dependent library as:

# for RHEL/CentOS
$ sudo yum install openssl-devel

# for Ubuntu/Debian
$ sudo apt-get install libssl-dev

Installation

native gem

gem install fluent-plugin-twitter

td-agent gem

/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-twitter

Input Configuration

Input Sample

<source>
  type twitter
  consumer_key        YOUR_CONSUMER_KEY       # Required
  consumer_secret     YOUR_CONSUMER_SECRET    # Required
  oauth_token         YOUR_OAUTH_TOKEN        # Required
  oauth_token_secret  YOUR_OAUTH_TOKEN_SECRET # Required
  tag                 input.twitter.sampling  # Required
  timeline            sampling                # Required (sampling or userstream)
  keyword             Ruby,Python             # Optional
  lang                ja,en                   # Optional
  output_format       nest                    # Optional (nest or flat or simple[default])
</source>

<match input.twitter.sampling>
  type stdout
</match>

Debug

$ tail -f /var/log/td-agent/td-agent.log

Output Configuration

Output Sample

<source>
  type http
  port 8888
</source>

<match notify.twitter>
  type twitter
  consumer_key        YOUR_CONSUMER_KEY
  consumer_secret     YOUR_CONSUMER_SECRET
  access_token         YOUR_OAUTH_TOKEN
  access_token_secret  YOUR_OAUTH_TOKEN_SECRET
</match>

Debug

$ curl http://localhost:8888/notify.twitter -F 'json={"message":"foo"}'

Reference

Twitter OAuth Guide

http://pocketstudio.jp/log3/2012/02/12/how_to_get_twitter_apikey_and_token/

Quick Tour to count a tweet with fluent-plugin-twitter and fluent-plugin-datacounter

http://qiita.com/items/fe4258b394190f23fece

TODO

  • support fetching twitter search
  • support fetching specific user userstream

patches welcome!

Known Issue

On starting fluentd, appearing alert message below. Please tell me how to fix up. /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1530: warning: already initialized constant EM

Copyright

Copyright © 2012- Kentaro Yoshida (@yoshi_ken)

License

Apache License, Version 2.0

fluent-plugin-twitter's People

Contributors

tacke758 avatar y-ken avatar yuiseki avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.