fluent-plugin-netflow 0.2.6 → 0.2.7

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: 9c2bb18ba20d2de75de5490e64ba10de0a6abf7d
4
- data.tar.gz: ea3c38edf0e0860df5b06e0b6ad05fe929433194
3
+ metadata.gz: 204a1b8e23eae4aad2693f22165bb914623b4c99
4
+ data.tar.gz: 64d34ce777898daa86b51c13e92d0f0354feb1d0
5
5
  SHA512:
6
- metadata.gz: f4b57bc44ffb69eed600bbf870b5a7dcef674180b80e8064469317741b49ce6423cb4bfada7155d6e64d58dacb2b956cf70063fe2edeeba98e3cf81f2990fa4f
7
- data.tar.gz: 4ef249c2456dc9af8afb2ab9ba38eced2e17050ecbf339545295b082168dccd47d63fdb129b7a0d9fd7169f70346d602aa68e315264f304aeeec004d38650197
6
+ metadata.gz: a40d37398d39b6e3dbd31997ac6e39c86b61258c1f5a4d50e4291f06ab43a1f1c12dcc47f54c85c04c769b6e319db0b834b20b6aa46144d18f8ecb8a96b3359f
7
+ data.tar.gz: cc5a8540eb078eb81169a82ec2f03191129051e23ef873fb1f0ec03ead17fd632d91ed371284abfa61a13d52084a0a76ba9f723f2775bbaec6d84ff76f1f8500
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.7
@@ -79,23 +79,23 @@ module Fluent
79
79
  end
80
80
 
81
81
  def format_for_switched(time)
82
- time.utc.strftime("%Y-%m-%dT%H:%M:%S.%3NZ")
82
+ time.utc.strftime("%Y-%m-%dT%H:%M:%S.%3NZ".freeze)
83
83
  end
84
84
 
85
85
  def format_for_flowSeconds(time)
86
- time.utc.strftime("%Y-%m-%dT%H:%M:%S")
86
+ time.utc.strftime("%Y-%m-%dT%H:%M:%S".freeze)
87
87
  end
88
88
 
89
89
  def format_for_flowMilliSeconds(time)
90
- time.utc.strftime("%Y-%m-%dT%H:%M:%S.%3NZ")
90
+ time.utc.strftime("%Y-%m-%dT%H:%M:%S.%3NZ".freeze)
91
91
  end
92
92
 
93
93
  def format_for_flowMicroSeconds(time)
94
- time.utc.strftime("%Y-%m-%dT%H:%M:%S.%6NZ")
94
+ time.utc.strftime("%Y-%m-%dT%H:%M:%S.%6NZ".freeze)
95
95
  end
96
96
 
97
97
  def format_for_flowNanoSeconds(time)
98
- time.utc.strftime("%Y-%m-%dT%H:%M:%S.%9NZ")
98
+ time.utc.strftime("%Y-%m-%dT%H:%M:%S.%9NZ".freeze)
99
99
  end
100
100
 
101
101
  NETFLOW_V5_HEADER_FORMAT = 'nnNNNNnn'
@@ -222,7 +222,7 @@ module Fluent
222
222
  entry = netflow_field_for(field.field_type, field.field_length)
223
223
  throw :field unless entry
224
224
 
225
- template_fields += entry
225
+ template_fields << entry
226
226
  end
227
227
  # We get this far, we have a list of fields
228
228
  key = "#{host}|#{pdu.source_id}|#{template.template_id}"
@@ -245,7 +245,7 @@ module Fluent
245
245
  entry = netflow_field_for(field.field_type, field.field_length, category)
246
246
  throw :field unless entry
247
247
 
248
- template_fields += entry
248
+ template_fields << entry
249
249
  end
250
250
  end
251
251
 
@@ -365,7 +365,7 @@ module Fluent
365
365
  ("uint" + (((length > 0) ? length : default) * 8).to_s).to_sym
366
366
  end
367
367
 
368
- def netflow_field_for(type, length, category='option')
368
+ def netflow_field_for(type, length, category = 'option'.freeze)
369
369
  unless field = @template_fields[category][type]
370
370
  $log.warn "Skip unsupported field", type: type, length: length
371
371
  return [:skip, nil, {length: length}]
@@ -379,13 +379,13 @@ module Fluent
379
379
  # Small bit of fixup for numeric value, :skip or :string field length, which are dynamic
380
380
  case field[0]
381
381
  when Integer
382
- [[uint_field(length, field[0]), field[1]]]
382
+ [uint_field(length, field[0]), field[1]]
383
383
  when :skip
384
- [field + [nil, {length: length}]]
384
+ field + [nil, {length: length}]
385
385
  when :string
386
- [field + [{length: length, trim_padding: true}]]
386
+ field + [{length: length, trim_padding: true}]
387
387
  else
388
- [field]
388
+ field
389
389
  end
390
390
  end
391
391
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-netflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Nakagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd