Logstash and Twitter Input


(Diego Gomez) #1

Hola a todos. Este es mi codigo en logstash.

       input {
              twitter { 
         consumer_key => "dplzZiWV2qP5q2dMZpM8lLb0c"
         consumer_secret =>"wpemcks8EqdgY3ZjV8dMJOViB0p
                            QuZsWOPtnH65jHAJdvyyaDW"
         oauth_token => "738404980470730752-lrULPA0EEPZHlMDOyDNVoSFdfvykyKJ"
         oauth_token_secret => "ydtfWx6QZ5a5CTG1R2rA7wCTcBwBVElvOfdVP9Uxo3JE3"
         keywords => [ "tecnologia" ]
         full_tweet => true
  }
}

filter {
   }

output {
stdout { codec => dots }
elasticsearch {
protocol => ["http"]
hosts => ["localhost:9200"]
index => "twitter"
document_type => "tweet"
    }
}

Tengo un problema en kibana me aparecen campos los cuales me dicen que no han sido indexados y por lo cual no los puedo visualizar. Me prodrián decir como hago para poder indexar esos campos así los veo? gracias


(Pere Urbon-Bayes) #2

Hola,
para saber un poco mas podrias poner una copia de la pantalla en kibana?

Saludos


(Diego Gomez) #3

Hola esto es lo que me muestra en kibana, los que están al lado con signos de pregunta no están indexados


(Diego Gomez) #4

Estos datos me tira logstash

               "created_at" => "Tue Jun 28 17:35:37 +0000 2016",
                       "id" => 747845925133967361,
                   "id_str" => "747845925133967361",
                     "text" => "El Sol parece adentrarse en una nueva fase evolutiva https://t.co/US9CDau5Na #tecnologia",
                   "source" => "<a href=\"http://twitterfeed.com\" rel=\"nofollow\">twitterfeed</a>",
                "truncated" => false,
    "in_reply_to_status_id" => nil,
"in_reply_to_status_id_str" => nil,
      "in_reply_to_user_id" => nil,
  "in_reply_to_user_id_str" => nil,
  "in_reply_to_screen_name" => nil,
                     "user" => {
                                    "id" => 1678983510,
                                "id_str" => "1678983510",
                                  "name" => "Tecnoticias",
                           "screen_name" => "tuitTecnologia",
                              "location" => "Madrid",
                                   "url" => nil,
                           "description" => "Padre de @tuitApple y @tuitAndroid. Publicamos cualquier #noticia sobre #ciencia y #tecnología: #móviles, #pcs, #consolas, #internet, #apple, #android y más.",
                             "protected" => false,
                              "verified" => false,
                       "followers_count" => 7588,
                         "friends_count" => 6400,
                          "listed_count" => 202,
                      "favourites_count" => 23,
                        "statuses_count" => 245511,
                            "created_at" => "Sat Aug 17 19:50:14 +0000 2013",
                            "utc_offset" => -14400,
                             "time_zone" => "Eastern Time (US & Canada)",
                           "geo_enabled" => false,
                                  "lang" => "es",
                  "contributors_enabled" => false,
                         "is_translator" => false,
              "profile_background_color" => "1A1B1F",
          "profile_background_image_url" => "http://abs.twimg.com/images/themes/theme9/bg.gif",
    "profile_background_image_url_https" => "https://abs.twimg.com/images/themes/theme9/bg.gif",
               "profile_background_tile" => false,
                    "profile_link_color" => "2F39ED",
          "profile_sidebar_border_color" => "FFFFFF",
            "profile_sidebar_fill_color" => "DDEEF6",
                    "profile_text_color" => "333333",
          "profile_use_background_image" => true,
                     "profile_image_url" => "http://pbs.twimg.com/profile_images/378800000391393974/5806f3428f11d4cfc6fd4de4ad28b9c3_normal.jpeg",
               "profile_image_url_https" => "https://pbs.twimg.com/profile_images/378800000391393974/5806f3428f11d4cfc6fd4de4ad28b9c3_normal.jpeg",
                    "profile_banner_url" => "https://pbs.twimg.com/profile_banners/1678983510/1406578558",
                       "default_profile" => false,
                 "default_profile_image" => false,
                             "following" => nil,
                   "follow_request_sent" => nil,
                         "notifications" => nil
},
                      "geo" => nil,
              "coordinates" => nil,
                    "place" => nil,
             "contributors" => nil,
          "is_quote_status" => false,
            "retweet_count" => 0,
           "favorite_count" => 0,
                 "entities" => {
         "hashtags" => [
        [0] {
               "text" => "tecnologia",
            "indices" => [
                [0] 77,
                [1] 88
            ]
        }
    ],
             "urls" => [
        [0] {
                     "url" => "https://t.co/US9CDau5Na",
            "expanded_url" => "http://tecnologia.tusueldo.com/14Ol",
             "display_url" => "tecnologia.tusueldo.com/14Ol",
                 "indices" => [
                [0] 53,
                [1] 76
            ]
        }
    ],
    "user_mentions" => [],
          "symbols" => []
},
                "favorited" => false,
                "retweeted" => false,
       "possibly_sensitive" => false,
             "filter_level" => "low",
                     "lang" => "es",
             "timestamp_ms" => "1467135337514",
                 "@version" => "1",
               "@timestamp" => "2016-06-28T17:35:37.000Z"

}


(system) #5