fluent-plugin-grepcounter 0.1.0.pre → 0.1.1

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
  SHA1:
3
- metadata.gz: c342677be8075559528320aa8964dd2208f6d2cb
4
- data.tar.gz: 28f6b36798b5023e180a9247ef6480b3997633c6
3
+ metadata.gz: 6e975b60c3a77833ed72a229d79c7c0cc64efa5a
4
+ data.tar.gz: 2aa97645c4645e08b2d0ce5cb0fc6576a688b53c
5
5
  SHA512:
6
- metadata.gz: 96e1fd97aee7feeb3f2843cac84558b4163e95bb175750e766bf5ea66da275556f75b425669c505ab51468b61a1047e8517aa4605f139358acdae4e92d96a7bb
7
- data.tar.gz: f6fc309ed2057081fe6a724a213f491c146dede6cad7d490ca92c186918a3e5e09874cce81d6e1da18c0de9feff0395956197b70f74d6bb0b2520eed842675e9
6
+ metadata.gz: df73667b60738771cc4adb82d4e79dc48defd6f9b8db5056787b0e71721cb897065b69bf71a6bc3cd50414ece433d718aecbf8dde8de7685ea19cd150cfc6dfe
7
+ data.tar.gz: d70577b7bd642a1360b57b91a92f716cb4b470f3e26cd26fe68566ef1bf57536b827824cdb01a33ede8a0816862c86ef53d69de00a82c91606db61390ad7d1f0
@@ -1,4 +1,10 @@
1
- ## 0.1.0 (2013/05/01)
1
+ ## 0.1.1 (2013/05/05)
2
+
3
+ Changes:
4
+
5
+ - Revert `output_delimiter` to `output_with_joined_delimiter`.
6
+
7
+ ## 0.1.0 (2013/05/05)
2
8
 
3
9
  Features:
4
10
 
data/README.md CHANGED
@@ -23,9 +23,14 @@ An example of grepcounter configuration:
23
23
  add_tag_prefix warn.count
24
24
  </source>
25
25
 
26
- Then, output bocomes as belows:
26
+ Then, output bocomes as belows (indented):
27
27
 
28
- warn.count.syslog.host1: {"count":2,"message":["2013/01/13T07:02:13.232645 WARN POST /auth","2013/01/13T07:02:43.632145 WARN POST /login"]}
28
+ warn.count.syslog.host1: {
29
+ "count":2,
30
+ "message":["2013/01/13T07:02:13.232645 WARN POST /auth","2013/01/13T07:02:43.632145 WARN POST /login"],
31
+ "input_tag":"syslog.host1",
32
+ "input_tag_last":"host1",
33
+ }
29
34
 
30
35
  Another example of grepcounter configuration to use `output_delimiter`:
31
36
 
@@ -40,9 +45,14 @@ Another example of grepcounter configuration to use `output_delimiter`:
40
45
  output_delimiter \n
41
46
  </source>
42
47
 
43
- Then, output bocomes as belows. You can use the `message` field is joined with \n.
48
+ Then, output bocomes as belows (indented). You can use the `message` field is joined with \n.
44
49
 
45
- warn.count.syslog.host1: {"count":2,"message":"2013/01/13T07:02:13.232645 WARN POST /auth\n2013/01/13T07:02:43.632145 WARN POST /login"}
50
+ warn.count.syslog.host1: {
51
+ "count":2,
52
+ "message":"2013/01/13T07:02:13.232645 WARN POST /auth\n2013/01/13T07:02:43.632145 WARN POST /login",
53
+ "input_tag":"syslog.host1",
54
+ "input_tag_last":"host1",
55
+ }
46
56
 
47
57
  ## Parameters
48
58
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-grepcounter"
6
- s.version = "0.1.0.pre"
6
+ s.version = "0.1.1"
7
7
  s.authors = ["Naotoshi SEO"]
8
8
  s.email = ["sonots@gmail.com"]
9
9
  s.homepage = "https://github.com/sonots/fluent-plugin-grepcounter"
@@ -9,7 +9,7 @@ class Fluent::GrepCounterOutput < Fluent::Output
9
9
  config_param :threshold, :integer, :default => 1
10
10
  config_param :output_tag, :string, :default => nil
11
11
  config_param :add_tag_prefix, :string, :default => 'count'
12
- config_param :output_delimiter, :string, :default => nil
12
+ config_param :output_with_joined_delimiter, :string, :default => nil
13
13
  config_param :aggregate, :string, :default => 'tag'
14
14
 
15
15
  attr_accessor :matches
@@ -115,7 +115,7 @@ class Fluent::GrepCounterOutput < Fluent::Output
115
115
  return nil if count < @threshold
116
116
  output = {}
117
117
  output['count'] = count
118
- output['message'] = @output_delimiter.nil? ? matches : matches.join(@output_delimiter)
118
+ output['message'] = @output_with_joined_delimiter.nil? ? matches : matches.join(@output_with_joined_delimiter)
119
119
  if tag
120
120
  output['input_tag'] = tag
121
121
  output['input_tag_last'] = tag.split('.').last
@@ -182,12 +182,12 @@ describe Fluent::GrepCounterOutput do
182
182
  it { emit }
183
183
  end
184
184
 
185
- context 'output_delimiter' do
185
+ context 'output_with_joined_delimiter' do
186
186
  let(:config) do
187
187
  # \\n shall be \n in config file
188
188
  CONFIG + %[
189
189
  regexp WARN
190
- output_delimiter \\n
190
+ output_with_joined_delimiter \\n
191
191
  ]
192
192
  end
193
193
  before do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-grepcounter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi SEO
@@ -115,9 +115,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  requirements:
118
- - - '>'
118
+ - - '>='
119
119
  - !ruby/object:Gem::Version
120
- version: 1.3.1
120
+ version: '0'
121
121
  requirements: []
122
122
  rubyforge_project: fluent-plugin-grepcounter
123
123
  rubygems_version: 2.0.0