fluent-plugin-netflow 1.0.2 → 1.1.0

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
- SHA1:
3
- metadata.gz: e16d08272207f9bb57f074bd023ec7953a518e4b
4
- data.tar.gz: 7381ce759465a95b680c52fe5888d47fd0c5b486
2
+ SHA256:
3
+ metadata.gz: f1fd86450ab2ad4b1c125ee6b58e7aa1fceb80778d0fd693ab5b1192b8de9b28
4
+ data.tar.gz: c9aadcfb6475585c180baaff51732672cc67fdde183a0dc41827192bc0fecddc
5
5
  SHA512:
6
- metadata.gz: e8f6755e304f32faadd3dd99e458708650d9259ced9d3f87b7df4ad3943158b39831e9824dd2c9bb951024cb6f97f918eb5a52343482164b5918f589fed2eacf
7
- data.tar.gz: dc4bed2b89d6e606214208aeda75c2114e6a8f71b82ca1f124c805e50515cc8b02f99049aac643730c9f46eedcf3cefed790cd9c61fb87b9c0fac764f4dc544d
6
+ metadata.gz: 3e44e5a9d7d1e672e88c99e2df9ea21d851fb6b30323a6aa1b9573d5cef5e71c5c6feeefdfac85ab1288f3c6946e7df04d92c5076686518c0da71a59a4a6478f
7
+ data.tar.gz: 22f41cd759942b12a6aedf19d6b4a9c6dbfa2565609c42aa432930fd0d9d56d9572c5d57458b0e9c1e9513e7d8c84348955c904749f77dc0ab06496f46cccf14
data/README.md CHANGED
@@ -65,10 +65,13 @@ When set to true, the plugin stores system uptime for ```first_switched``` and `
65
65
 
66
66
  YAML file containing Netflow field definitions to overfide pre-defined templates. Example is like below
67
67
 
68
- ---
69
- 4: # field value
70
- - :uint8 # field length
71
- - :protocol # field type
68
+ ```yaml
69
+ ---
70
+ option:
71
+ 4: # field value
72
+ - :uint8 # field length
73
+ - :protocol # field type
74
+ ```
72
75
 
73
76
 
74
77
  ## Performance Evaluation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.1.0
@@ -40,7 +40,16 @@ module Fluent
40
40
  if @definitions
41
41
  raise Fluent::ConfigError, "definitions file #{@definitions} doesn't exist" unless File.exist?(@definitions)
42
42
  begin
43
- @template_fields['option'].merge!(YAML.load_file(@definitions))
43
+ template_fields_custom = YAML.load_file(@definitions)
44
+ if template_fields_custom.first.last.is_a?(Array) # compatibility for older definition files
45
+ @template_fields['option'].merge!(template_fields_custom)
46
+ else
47
+ @template_fields.each do |key, _|
48
+ if template_fields_custom.key?(key)
49
+ @template_fields[key].merge!(template_fields_custom[key])
50
+ end
51
+ end
52
+ end
44
53
  rescue => e
45
54
  raise Fluent::ConfigError, "Bad syntax in definitions file #{@definitions}, error_class = #{e.class.name}, error = #{e.message}"
46
55
  end
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: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Nakagawa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2022-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -124,8 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubyforge_project:
128
- rubygems_version: 2.6.14.1
127
+ rubygems_version: 3.1.6
129
128
  signing_key:
130
129
  specification_version: 4
131
130
  summary: Netflow plugin for Fluentd