logstash-input-meetup 2.0.4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +12 -3
- data/lib/logstash/inputs/meetup.rb +15 -17
- data/logstash-input-meetup.gemspec +3 -5
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a32a2d4185ee8dd83f72271e5431c263f27619e
|
4
|
+
data.tar.gz: 2987221c9a539a01babf3005bd78569e613366b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 283d23d5d7b470c2f46648ee386fb7882af85c72e6bd630741671623d9e826eea26984f63ce39fa778b772c48df2c2c947782e6706265c84006e99c6e7e22d8a
|
7
|
+
data.tar.gz: d97b8d31f0a43bb32387e60e935820bd8638cc23bdb90cfa45f84bd1adac400badaaed8b3be276ec0b44107e9b31cd36f3999634c59edef826f12f5b99539eb9
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Logstash Plugin
|
2
2
|
|
3
|
-
[![Build
|
4
|
-
Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-meetup-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-meetup-unit/)
|
3
|
+
[![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-input-meetup.svg)](https://travis-ci.org/logstash-plugins/logstash-input-meetup)
|
5
4
|
|
6
5
|
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
7
6
|
|
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
|
|
56
55
|
```
|
57
56
|
- Install plugin
|
58
57
|
```sh
|
58
|
+
# Logstash 2.3 and higher
|
59
|
+
bin/logstash-plugin install --no-verify
|
60
|
+
|
61
|
+
# Prior to Logstash 2.3
|
59
62
|
bin/plugin install --no-verify
|
63
|
+
|
60
64
|
```
|
61
65
|
- Run Logstash with your plugin
|
62
66
|
```sh
|
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
|
|
74
78
|
```
|
75
79
|
- Install the plugin from the Logstash home
|
76
80
|
```sh
|
77
|
-
|
81
|
+
# Logstash 2.3 and higher
|
82
|
+
bin/logstash-plugin install --no-verify
|
83
|
+
|
84
|
+
# Prior to Logstash 2.3
|
85
|
+
bin/plugin install --no-verify
|
86
|
+
|
78
87
|
```
|
79
88
|
- Start Logstash and proceed to test the plugin
|
80
89
|
|
@@ -1,16 +1,10 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require "logstash/inputs/base"
|
3
3
|
require "logstash/namespace"
|
4
|
+
require "logstash/json"
|
4
5
|
require "socket" # for Socket.gethostname
|
5
6
|
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# Notes:
|
9
|
-
#
|
10
|
-
# * The `@source` of this event will be the command run.
|
11
|
-
# * The `@message` of this event will be the entire stdout of the command
|
12
|
-
# as one event.
|
13
|
-
#
|
7
|
+
# Periodically query meetup.com regarding updates on events for the given meetupkey
|
14
8
|
class LogStash::Inputs::Meetup < LogStash::Inputs::Base
|
15
9
|
|
16
10
|
config_name "meetup"
|
@@ -27,7 +21,7 @@ class LogStash::Inputs::Meetup < LogStash::Inputs::Base
|
|
27
21
|
# Must have one of `urlname`, `venueid`, `groupid`
|
28
22
|
config :groupid, :validate => :string
|
29
23
|
|
30
|
-
# Interval to run the command. Value is in
|
24
|
+
# Interval to run the command. Value is in minutes.
|
31
25
|
config :interval, :validate => :number, :required => true
|
32
26
|
|
33
27
|
# Meetup Key
|
@@ -64,17 +58,21 @@ class LogStash::Inputs::Meetup < LogStash::Inputs::Base
|
|
64
58
|
|
65
59
|
# Pull down the RSS feed using FTW so we can make use of future cache functions
|
66
60
|
response = Faraday.get @url
|
67
|
-
|
61
|
+
begin
|
62
|
+
result = LogStash::Json.load(response.body)
|
63
|
+
rescue LogStash::Json::ParserError
|
64
|
+
# silently ignore json parsing errors
|
65
|
+
end
|
68
66
|
|
69
|
-
result["results"].each do |rawevent|
|
67
|
+
result["results"].each do |rawevent|
|
70
68
|
event = LogStash::Event.new(rawevent)
|
71
69
|
# Convert the timestamps into Ruby times
|
72
|
-
event
|
73
|
-
event
|
74
|
-
event[
|
75
|
-
event
|
76
|
-
|
77
|
-
event[
|
70
|
+
event.set('created', LogStash::Timestamp.at(event.get('created') / 1000, (event.get('created') % 1000) * 1000))
|
71
|
+
event.set('time', LogStash::Timestamp.at(event.get('time') / 1000, (event.get('time') % 1000) * 1000))
|
72
|
+
event.set('[group][created]', LogStash::Timestamp.at(event.get('group][created]') / 1000, (event.get('group][created]') % 1000) * 1000))
|
73
|
+
event.set('updated', LogStash::Timestamp.at(event.get('updated') / 1000, (event.get('updated') % 1000) * 1000))
|
74
|
+
event.set('[venue][lonlat]', [event.get('[venue][lon]'), event.get('[venue][lat]') if rawevent.has_key?('venue'))
|
75
|
+
event.set('[group][lonlat]', [event.get('[group][group_lon]',event'[group][group_lat]') if rawevent.has_key?('group'))
|
78
76
|
decorate(event)
|
79
77
|
queue << event
|
80
78
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-meetup'
|
4
|
-
s.version = '
|
4
|
+
s.version = '3.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Query and pull events from meetup groups."
|
7
|
-
s.description = "This gem is a
|
7
|
+
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
8
8
|
s.authors = ["Elastic"]
|
9
9
|
s.email = 'jason.kendall@elastic.co'
|
10
10
|
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
|
@@ -20,9 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core-plugin-api", "~>
|
24
|
-
|
25
|
-
s.add_runtime_dependency 'addressable'
|
23
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
|
26
24
|
|
27
25
|
s.add_development_dependency 'logstash-devutils'
|
28
26
|
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-meetup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
18
|
+
version: '2.0'
|
19
19
|
name: logstash-core-plugin-api
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,21 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
29
|
-
requirements:
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '0'
|
33
|
-
name: addressable
|
34
|
-
prerelease: false
|
35
|
-
type: :runtime
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
26
|
+
version: '2.0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
43
29
|
requirements:
|
@@ -52,7 +38,7 @@ dependencies:
|
|
52
38
|
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '0'
|
55
|
-
description: This gem is a
|
41
|
+
description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
|
56
42
|
email: jason.kendall@elastic.co
|
57
43
|
executables: []
|
58
44
|
extensions: []
|