fluent-plugin-out-falcon 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3af1f551ada4967a76e7e3bfb8881bfedaa5a6e
4
- data.tar.gz: 46b3ed9993fa49efad4e5307250489c746b4a14a
3
+ metadata.gz: b94f1e32e3c04230e8471bd0b680ee144d046bc4
4
+ data.tar.gz: df5877ef742ab8c9ac009a31c35729c4bce6daab
5
5
  SHA512:
6
- metadata.gz: 8f1d5863dbe053d918aa9a668c8c58c90dd2234122a01b39c81a773684397e8203dc04b813263b324ff8259ef83b088fbe9f4454ed33f9f389981e1196def0fa
7
- data.tar.gz: 65c81bd79d23a32d385f7c488475175f1462eadd45fad6439c9f78227e2893ff48ac15b49c643a95dfb6f47652177f93dffbc83f937a24351406b9e0d8a7e7a6
6
+ metadata.gz: e6d0fdaad52691aefe5e3735eac935dcc748d862c714679910e6800499928669f20a782331e1aa77d65cbd77f046568125809fcf2699be2bbdcc3e21399d20dd
7
+ data.tar.gz: 0b28f20e9574fc5d52e4d85399f6b97d14022e7f36998e0d681c89b59b24ca4179719f13fbb137100eb58206681010a2614f2930fb8ef09c921da36f129ec11c
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-out-falcon"
5
- gem.version = "0.1.8"
5
+ gem.version = "0.1.9"
6
6
  gem.authors = ["tsingakbar"]
7
7
  gem.email = ["yuqing@cmcm.com"]
8
8
  gem.summary = %q{A Fluentd output plugin to send logs to falcon's push API}
@@ -17,8 +17,7 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_runtime_dependency "yajl-ruby", "~> 1.0"
19
19
  gem.add_runtime_dependency "fluentd", [">= 0.10.0", "< 2"]
20
- gem.add_runtime_dependency "net-http-persistent", ">= 2.9.0"
21
- gem.add_development_dependency "bundler"
22
- gem.add_development_dependency "rake"
23
- gem.add_development_dependency "test-unit", ">= 3.1.0"
20
+ gem.add_runtime_dependency "net-http-persistent", "~> 2.9.0", ">= 2.9.0"
21
+ gem.add_development_dependency "bundler", '~> 0'
22
+ gem.add_development_dependency "rake", '~>0'
24
23
  end
@@ -13,6 +13,8 @@ class Fluent::FalconOutput < Fluent::Output
13
13
  # Endpoint URL ex. localhost.local/api/
14
14
  config_param :endpoint_url, :string
15
15
 
16
+ config_param :match_tag, :string, :default => nil
17
+
16
18
  # Simple rate limiting: ignore any records within `rate_limit_msec`
17
19
  # since the last one.
18
20
  config_param :rate_limit_msec, :integer, :default => 0
@@ -71,7 +73,7 @@ class Fluent::FalconOutput < Fluent::Output
71
73
  def send_request(req, uri)
72
74
  is_rate_limited = (@rate_limit_msec != 0 and not @last_request_time.nil?)
73
75
  if is_rate_limited and ((Time.now.to_f - @last_request_time) * 1000.0 < @rate_limit_msec)
74
- $log.info('Dropped request due to rate limiting')
76
+ #$log.info('Dropped request due to rate limiting')
75
77
  return
76
78
  end
77
79
 
@@ -100,8 +102,10 @@ class Fluent::FalconOutput < Fluent::Output
100
102
  end # end send_request
101
103
 
102
104
  def handle_record(tag, time, record)
103
- req, uri = create_request(tag, time, record)
104
- send_request(req, uri)
105
+ if @match_tag == nil || @match_tag == tag
106
+ req, uri = create_request(tag, time, record)
107
+ send_request(req, uri)
108
+ end
105
109
  end
106
110
 
107
111
  def emit(tag, es, chain)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-out-falcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - tsingakbar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-20 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -48,6 +48,9 @@ dependencies:
48
48
  name: net-http-persistent
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: 2.9.0
51
54
  - - ">="
52
55
  - !ruby/object:Gem::Version
53
56
  version: 2.9.0
@@ -55,6 +58,9 @@ dependencies:
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: 2.9.0
58
64
  - - ">="
59
65
  - !ruby/object:Gem::Version
60
66
  version: 2.9.0
@@ -62,44 +68,30 @@ dependencies:
62
68
  name: bundler
63
69
  requirement: !ruby/object:Gem::Requirement
64
70
  requirements:
65
- - - ">="
71
+ - - "~>"
66
72
  - !ruby/object:Gem::Version
67
73
  version: '0'
68
74
  type: :development
69
75
  prerelease: false
70
76
  version_requirements: !ruby/object:Gem::Requirement
71
77
  requirements:
72
- - - ">="
78
+ - - "~>"
73
79
  - !ruby/object:Gem::Version
74
80
  version: '0'
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: rake
77
83
  requirement: !ruby/object:Gem::Requirement
78
84
  requirements:
79
- - - ">="
85
+ - - "~>"
80
86
  - !ruby/object:Gem::Version
81
87
  version: '0'
82
88
  type: :development
83
89
  prerelease: false
84
90
  version_requirements: !ruby/object:Gem::Requirement
85
91
  requirements:
86
- - - ">="
92
+ - - "~>"
87
93
  - !ruby/object:Gem::Version
88
94
  version: '0'
89
- - !ruby/object:Gem::Dependency
90
- name: test-unit
91
- requirement: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: 3.1.0
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: 3.1.0
103
95
  description: A Fluentd output plugin to send logs to falcon's push API
104
96
  email:
105
97
  - yuqing@cmcm.com