logstash-input-google-analytics-daily 0.1.0 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1acf86c6fbba654cc2b169ba1a37b37a5e3c7287f95dd31b0b0cdea4eb5b278c
4
- data.tar.gz: 967c8c040e7e02a1e7293817e24837a71fdad9530ca629a168f6a0810cc1250e
3
+ metadata.gz: 1f77de4fea72f6c2172717186fcc823959b2e55dd42a99a990cc95c05f69c806
4
+ data.tar.gz: 15aa34e39adee6b5ee7a3ca37cbcc94f923f30d4b4bd11eb2c62743df7298c94
5
5
  SHA512:
6
- metadata.gz: 8ef569d8ed0f2cec8365c6ff7acbc98aaeba8662159d611962db63eb3ef5b6661991cb8c09923106635385384e76f49f30995f9c166a664e4770f56f413b4650
7
- data.tar.gz: d3b9e1e1bcad5ad20b7bf57f7152c395a2dca7eafea0fc12ad2bf667262383f4d8a56d22f9a613948a5b9980f59be1fdbf10a4727b734f72c2ed2bb220dd5b89
6
+ metadata.gz: 3a578250682fe2c5b75c74bf3b2d85197e911eefe4dd00c59d53fc59df64c67b035e56e9a6da85fd6bf34b9ad66ba7fc041b6a2624f6c9f3338370429367ddef
7
+ data.tar.gz: 1dbbc2951b6e54912f93ca3ae640c66657e9c1819fb9f9eb1c980934cac0dde18d4d783f40c1d6f92739779f7c56fc66eb54c529b8bb70d32491e60a895ff590
data/README.md CHANGED
@@ -6,7 +6,7 @@ Forked from https://github.com/russorat/logstash-input-googleanalytics.git.
6
6
 
7
7
  ## Documentation
8
8
 
9
- Documentation automatically generated by Logstash at
9
+ Documentation can be seen in [the docs folder](https://github.com/DeimosCloud/logstash-input-google-analytics-daily/blob/master/docs/index.asciidoc).
10
10
 
11
11
  ## Developing
12
12
 
@@ -120,6 +120,10 @@ class LogStash::Inputs::GoogleAnalyticsDaily < LogStash::Inputs::Base
120
120
  # Populate Logstash event fields
121
121
  event.set('ga.contains_sampled_data', results.contains_sampled_data?)
122
122
  event.set('ga.query', query) if @store_query
123
+ # We need to convert the date fields here to string because sometimes it's a relative date
124
+ event.set('ga.query.start_date', query["start_date"].to_s) if @store_query
125
+ event.set('ga.query.end_date', query["end_date"].to_s) if @store_query
126
+
123
127
  event.set('ga.profile_info', profile_info) if @store_profile
124
128
 
125
129
  if date == 'today'
@@ -134,7 +138,7 @@ class LogStash::Inputs::GoogleAnalyticsDaily < LogStash::Inputs::Base
134
138
  end
135
139
 
136
140
  # Use date and metrics as ID to prevent duplicate entries in Elasticsearch
137
- event.set('_id', event.get('ga.date') + options[:metrics])
141
+ event.set('[@metadata][id]', event.get('ga.date') + options[:metrics])
138
142
 
139
143
  rows = []
140
144
 
@@ -213,7 +217,7 @@ class LogStash::Inputs::GoogleAnalyticsDaily < LogStash::Inputs::Base
213
217
  :metrics => @metrics.sort.join(','),
214
218
  :output => 'json',
215
219
  }
216
- options.merge!({:dimensions => @dimensions.join(',')}) if (@dimensions and @dimensions.size?)
220
+ options.merge!({:dimensions => @dimensions.join(',')}) if (@dimensions and @dimensions.size)
217
221
  options.merge!({:filters => @filters}) if @filters
218
222
  options.merge!({:sort => @sort}) if @sort
219
223
  options.merge!({:segment => @segment}) if @segment
@@ -1,12 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-google-analytics-daily'
3
- s.version = '0.1.0'
3
+ s.version = '0.1.5'
4
4
  s.licenses = ['Apache License (2.0)']
5
- s.summary = "Logstash plugin to pull daily reports from the Google Analytics v3 Core Reporting API."
6
- s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install logstash-input-google-analytics-daily."
5
+ s.summary = "Logstash plugin to pull daily reports from Google Analytics."
6
+ s.description = "Logstash plugin to pull daily reports from the Google Analytics v3 Core Reporting API. Install into Logstash using $LS_HOME/bin/logstash-plugin install logstash-input-google-analytics-daily."
7
7
  s.authors = ["Shalvah"]
8
- s.email = 'hello@shalvah.me'
9
- s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
8
+ s.email = 'shalvah.adebayo@gmail.com'
9
+ s.homepage = "http://www.elastic.co/guide/en/logstash/current/plugins-inputs-google_analytics_daily.html.html"
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
20
20
  # Gem dependencies
21
21
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 2.0.0", "< 3.0.0"
22
22
  s.add_runtime_dependency 'stud', '>= 0.0.22'
23
- s.add_runtime_dependency 'google-api-client', "0.37"
24
- s.add_runtime_dependency 'googleauth'
23
+ s.add_runtime_dependency 'google-api-client', "~> 0.37"
24
+ s.add_runtime_dependency 'googleauth', ">= 0.10.0"
25
25
  s.add_development_dependency 'vcr'
26
26
  s.add_development_dependency 'webmock'
27
27
  s.add_development_dependency 'json'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-google-analytics-daily
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shalvah
@@ -47,7 +47,7 @@ dependencies:
47
47
  - !ruby/object:Gem::Dependency
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - '='
50
+ - - "~>"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0.37'
53
53
  name: google-api-client
@@ -55,7 +55,7 @@ dependencies:
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - '='
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.37'
61
61
  - !ruby/object:Gem::Dependency
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: '0'
66
+ version: 0.10.0
67
67
  name: googleauth
68
68
  type: :runtime
69
69
  prerelease: false
@@ -71,7 +71,7 @@ dependencies:
71
71
  requirements:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: 0.10.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
@@ -114,9 +114,10 @@ dependencies:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
- description: This gem is a logstash plugin required to be installed on top of the
118
- Logstash core pipeline using $LS_HOME/bin/plugin install logstash-input-google-analytics-daily.
119
- email: hello@shalvah.me
117
+ description: Logstash plugin to pull daily reports from the Google Analytics v3 Core
118
+ Reporting API. Install into Logstash using $LS_HOME/bin/logstash-plugin install
119
+ logstash-input-google-analytics-daily.
120
+ email: shalvah.adebayo@gmail.com
120
121
  executables: []
121
122
  extensions: []
122
123
  extra_rdoc_files: []
@@ -130,7 +131,7 @@ files:
130
131
  - lib/logstash/inputs/google_analytics_daily.rb
131
132
  - logstash-input-google-analytics-daily.gemspec
132
133
  - spec/inputs/google_analytics_daily_spec.rb
133
- homepage: http://www.elastic.co/guide/en/logstash/current/index.html
134
+ homepage: http://www.elastic.co/guide/en/logstash/current/plugins-inputs-google_analytics_daily.html.html
134
135
  licenses:
135
136
  - Apache License (2.0)
136
137
  metadata:
@@ -154,7 +155,6 @@ requirements: []
154
155
  rubygems_version: 3.0.6
155
156
  signing_key:
156
157
  specification_version: 4
157
- summary: Logstash plugin to pull daily reports from the Google Analytics v3 Core Reporting
158
- API.
158
+ summary: Logstash plugin to pull daily reports from Google Analytics.
159
159
  test_files:
160
160
  - spec/inputs/google_analytics_daily_spec.rb