Here are some cases where Fluentd is useful:
We assume that you already have Fluentd installed and have created a Twitter app (we just need the consumer key/secret and OAuth token/secret).
Install the Twitter input plugin by running the following command
$ fluent-gem install fluent-plugin-twitter
Open your Fluentd configuration file and add the following lines:
<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 # Required
timeline userstream # Required (sampling or userstream)
</source>
The above configuration starts streaming data from your timeline and apply the tag input.twitter
. Alternatively, if you want to search for a particular keyword(s), you can configure it as
<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 # Required
keyword fluentd, muffins
timeline sampling # Required (sampling or userstream)
</source>
It will search for "fluentd" and "muffins" and return the sampled timeline.
It's time to configure data outputs. Here are some examples.
Want to learn the basics of Fluentd? Check out these pages.
Couldn't find enough information? Let's ask the community!
You need commercial-grade support from Fluentd committers and experts?
©2010-2024 Fluentd Project. ALL Rights Reserved.
Fluentd is a hosted project under the Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.