Ingest events from the Twitter Streaming API.
Synopsis
editThis plugin supports the following configuration options:
Required configuration options:
twitter { consumer_key => ... consumer_secret => ... oauth_token => ... oauth_token_secret => ... }
Available configuration options:
Setting | Input type | Required | Default value |
---|---|---|---|
No |
|
||
No |
|
||
Yes |
|||
Yes |
|||
No |
|||
No |
|
||
No |
|
||
No |
|||
No |
|||
No |
|||
Yes |
|||
Yes |
|||
No |
|
||
No |
|
||
No |
|||
No |
|||
No |
|
||
No |
|
Details
edit
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
follows
edit- Value type is array
- There is no default value for this setting.
A comma separated list of user IDs, indicating the users to return statuses for in the Twitter stream. See https://dev.twitter.com/streaming/overview/request-parameters#follow for more details.
full_tweet
edit- Value type is boolean
-
Default value is
false
Record full tweet object as given to us by the Twitter Streaming API.
ignore_retweets
edit- Value type is boolean
-
Default value is
false
Lets you ingore the retweets coming out of the Twitter API. Default ⇒ false
keywords
edit- Value type is array
- There is no default value for this setting.
Any keywords to track in the Twitter stream. For multiple keywords, use the syntax ["foo", "bar"]. There’s a logical OR between each keyword string listed and a logical AND between words separated by spaces per keyword string. See https://dev.twitter.com/streaming/overview/request-parameters#track for more details.
The wildcard "*" option is not supported. To ingest a sample stream of all tweets, the use_samples option is recommended.
languages
edit- Value type is array
- There is no default value for this setting.
A list of BCP 47 language identifiers corresponding to any of the languages listed on Twitter’s advanced search page will only return tweets that have been detected as being written in the specified languages.
locations
edit- Value type is string
- There is no default value for this setting.
A comma-separated list of longitude, latitude pairs specifying a set of bounding boxes to filter tweets by. See https://dev.twitter.com/streaming/overview/request-parameters#locations for more details.
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.
proxy_address
edit- Value type is string
-
Default value is
"127.0.0.1"
Location of the proxy, by default the same machine as the one running this LS instance
proxy_port
edit- Value type is number
-
Default value is
3128
Port where the proxy is listening, by default 3128 (squid)
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.
use_proxy
edit- Value type is boolean
-
Default value is
false
When to use a proxy to handle the connections
use_samples
edit- Value type is boolean
-
Default value is
false
Returns a small random sample of all public statuses. The tweets returned by the default access level are the same, so if two different clients connect to this endpoint, they will see the same tweets. If set to true, the keywords, follows, locations, and languages options will be ignored. Default ⇒ false