Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catherinewills/7861e8cc27b1caa31e04e3b9597d0dbb to your computer and use it in GitHub Desktop.
Save catherinewills/7861e8cc27b1caa31e04e3b9597d0dbb to your computer and use it in GitHub Desktop.
Twitter Pipeline Configuration File for Analysis of posts of Genesis Invitational 2021 and PGA Tour. Also, Tiger Woods' vehicle accident altered data regarding invitational
#Used Homebrew in MacOS in BigSur
#Make sure everything is the most updated versions
#Download and run Elasticsearch, Kibana, and Logstash
#Elasticsearch and Kibana ./kibana and ./elasticsearch
#Make sure all 3 host websites are up and running
#In Logstash, make a file called logstash either by itself or in conf file using mkdir to make the file and then nano twitter_pipeline.conf to type in configuriaton file
#Insert below configuration file using your key, click exit and Y when they ask you to save it
#Sometimes you can run into problems with elasticsearch if your drive has no room or if logstash has already been ran, must fix pathway or stop running lgostash. This was tricky.
#Run using ./logstash or bin something.. see doc
#See documentary if it doesn't work
#Then go to create index and pull it up.. if it doesn't pull up, logstash could not be running
#Make sure to put @timestamp
#Twitter Configuration File for PGA Golf labeled twitter_pipeline.conf as nano file in logstash file
input {
twitter {
consumer_key => "YourCosumerKeyFromTwitterDeveloperAccountGoesHereAlsoCalledAPIKey"
consumer_secret => "YourCosumerKeyFromTwitterDeveloperAccountGoesHereAlsoCalledAPISecretKey"
oauth_token => "YourCosumerKeyFromTwitterDeveloperAccountGoesHereNotBearerToken"
oauth_token_secret => "YourCosumerKeyFromTwitterDeveloperAccountGoesHereNotBearerToken"
keywords => ["Spieth","SamBurns","GenesisInvitational","PGATour","Homa","Finau"]
languages => ["en"]
full_tweet => true
ignore_retweets => true
}
}
output {
elasticsearch {
hosts => ["127.0.0.1:9200"]
index => "tweets"
}
stdout {
# include this to pretty-print the event's json to stdout
codec => rubydebug
}
}
#index can be anything
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment