Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kibana Essentials

You're reading from   Kibana Essentials Use the functionalities of Kibana to discover data and build attractive visualizations and dashboards for real-world scenarios

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781784394936
Length 206 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Creating a Logstash configuration file


In this section, we will develop a configuration file that will contain input and output. Here, input will be twitter and output will be elasticsearch, as we need to store data in Elasticsearch for visualization in Kibana. We will not use a filter as we want to store the tweets in the same way as they are tweeted.

The configuration file will look like this:

input {
  twitter {
    consumer_key =>  "XXXXXXXXXXXXXXXXXXX"
    consumer_secret =>  "XXXXXXXXXXXXXXXXXX"
    oauth_token =>  "XXXXXXXXXXXXXXXXXXXXXXXX"
    oauth_token_secret =>  "XXXXXXXXXXXXXXXXXXXX"
    keywords => ["#DragMeDownDay,"#BePositive"]
    full_tweet => "true"
  }
}
output {
  elasticsearch {
    protocol => "http"
    host => "localhost"
    port => "9200"
    index => "twitter"
    document_type => "realtime"
  }
}

Save this configuration as twitter.conf inside the bin folder of the downloaded Logstash folder.

Let's decode each parameter for better...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime