fluent-plugin-netflow 0.2.7 → 0.2.8

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: 204a1b8e23eae4aad2693f22165bb914623b4c99
4
- data.tar.gz: 64d34ce777898daa86b51c13e92d0f0354feb1d0
3
+ metadata.gz: c9584ad91d1208c8ad6bcbc2823dbff74d0227cf
4
+ data.tar.gz: 934185e7c819deefb8ba1e371e7242ffbfe8c935
5
5
  SHA512:
6
- metadata.gz: a40d37398d39b6e3dbd31997ac6e39c86b61258c1f5a4d50e4291f06ab43a1f1c12dcc47f54c85c04c769b6e319db0b834b20b6aa46144d18f8ecb8a96b3359f
7
- data.tar.gz: cc5a8540eb078eb81169a82ec2f03191129051e23ef873fb1f0ec03ead17fd632d91ed371284abfa61a13d52084a0a76ba9f723f2775bbaec6d84ff76f1f8500
6
+ metadata.gz: 0d398b04b33ae4ccbdb4642b77f1c52daccc78f59e003e0ca995732fd93c0f20d4d5e76e66282b984b4ab9045a1ae00923378bfc4dfc1770af3746ba571ad0fd
7
+ data.tar.gz: 05b97f663f248fc1ab79360ff241773019f4154be0348128701e57ebb088a43c5925c6f8167c76734978a6baedef7b45976223f94c36e186d5cf4aefba693de0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -16,6 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
  require 'cool.io'
19
+ require 'fluent/input'
19
20
  require 'fluent/plugin/socket_util'
20
21
  require 'fluent/plugin/parser_netflow'
21
22
 
@@ -145,7 +145,7 @@ module Fluent
145
145
  sampling_algorithm = (sampling & 0b1100000000000000) >> 14
146
146
  sampling_interval = sampling & 0b0011111111111111
147
147
 
148
- time = Time.at(unix_sec, unix_nsec / 1000).to_i # TODO: Fluent::EventTime
148
+ time = unix_sec.to_i
149
149
 
150
150
  records_bytes = payload.bytesize - NETFLOW_V5_HEADER_BYTES
151
151
 
@@ -289,7 +289,7 @@ module Fluent
289
289
  next
290
290
  end
291
291
 
292
- time = pdu.unix_sec # TODO: Fluent::EventTime (see: forV5)
292
+ time = pdu.unix_sec.to_i
293
293
  event = {}
294
294
 
295
295
  # Fewer fields in the v9 header
@@ -218,6 +218,7 @@ class NetflowParserTest < Test::Unit::TestCase
218
218
  end
219
219
 
220
220
  assert_equal 1, parsed.size
221
+ assert_instance_of Integer, parsed.first[0]
221
222
  assert_equal time1, parsed.first[0]
222
223
 
223
224
  event = parsed.first[1]
@@ -68,6 +68,7 @@ class Netflow9ParserTest < Test::Unit::TestCase
68
68
  end
69
69
 
70
70
  assert_equal 1, parsed.size
71
+ assert_instance_of Integer, parsed.first[0]
71
72
  assert_equal Time.parse('2016-02-12T04:02:25Z').to_i, parsed.first[0]
72
73
  expected_record = {
73
74
  # header
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.7
4
+ version: 0.2.8
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-22 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.6.11
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Netflow plugin for Fluentd