twitter

edit

Read events from the twitter streaming api.

 

Synopsis

edit

This plugin supports the following configuration options:

Required configuration options:

twitter {
    consumer_key => ...
    consumer_secret => ...
    keywords => ...
    oauth_token => ...
    oauth_token_secret => ...
}

Available configuration options:

Setting Input type Required Default value

add_field

hash

No

{}

codec

codec

No

"plain"

consumer_key

string

Yes

consumer_secret

password

Yes

full_tweet

boolean

No

false

keywords

array

Yes

oauth_token

string

Yes

oauth_token_secret

password

Yes

tags

array

No

type

string

No

Details

edit

 

add_field

edit
  • Value type is hash
  • Default value is {}

Add a field to an event

codec

edit
  • Value type is codec
  • Default value is "plain"

The codec used for input data. Input codecs are a convenient method for decoding your data before it enters the input, without needing a separate filter in your Logstash pipeline.

consumer_key

edit
  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

Your twitter app’s consumer key

Don’t know what this is? You need to create an "application" on twitter, see this url: https://dev.twitter.com/apps/new

consumer_secret

edit
  • This is a required setting.
  • Value type is password
  • There is no default value for this setting.

Your twitter app’s consumer secret

If you don’t have one of these, you can create one by registering a new application with twitter: https://dev.twitter.com/apps/new

full_tweet

edit
  • Value type is boolean
  • Default value is false

Record full tweet object as given to us by the Twitter stream api.

keywords

edit
  • This is a required setting.
  • Value type is array
  • There is no default value for this setting.

Any keywords to track in the twitter stream

oauth_token

edit
  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

Your oauth token.

To get this, login to twitter with whatever account you want, then visit https://dev.twitter.com/apps

Click on your app (used with the consumer_key and consumer_secret settings) Then at the bottom of the page, click Create my access token which will create an oauth token and secret bound to your account and that application.

oauth_token_secret

edit
  • This is a required setting.
  • Value type is password
  • There is no default value for this setting.

Your oauth token secret.

To get this, login to twitter with whatever account you want, then visit https://dev.twitter.com/apps

Click on your app (used with the consumer_key and consumer_secret settings) Then at the bottom of the page, click Create my access token which will create an oauth token and secret bound to your account and that application.

tags

edit
  • Value type is array
  • There is no default value for this setting.

Add any number of arbitrary tags to your event.

This can help with processing later.

type

edit
  • Value type is string
  • There is no default value for this setting.

Add a type field to all events handled by this input.

Types are used mainly for filter activation.

The type is stored as part of the event itself, so you can also use the type to search for it in Kibana.

If you try to set a type on an event that already has one (for example when you send an event from a shipper to an indexer) then a new input will not override the existing type. A type set at the shipper stays with that event for its life even when sent to another Logstash server.