fluent-plugin-nais 0.36.0 → 0.37.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
2
  SHA1:
3
- metadata.gz: d011ea18c2cae66f5139d8c1adf827d24b368052
4
- data.tar.gz: 935f0bb6a1da24ae45b26b809d60512038829527
3
+ metadata.gz: e33891de2aa93233e1a8ffde64473710209634f0
4
+ data.tar.gz: 656c8cbcbc9222f312ac80d8161f555fbe7aefbe
5
5
  SHA512:
6
- metadata.gz: 3521542ac90b51bcdacc23e028ebf07e32a144096137e397cb08fb83044ad245d478292cac6ba69ef35da7d4d6a6842bdf177536d03211e00ac68389d46ed441
7
- data.tar.gz: 9abd4476a218dbea14cc6de1ceb10b2c8718f64405cd66820fdf8d811c26cfe2f4634152775a64cdab6e5633eeecdcdaa6ec95cc5c9b02c94def2d0aa1124b64
6
+ metadata.gz: 1421a8977fcfd95ac1be2227b0711c9adc4b4b1b5d09583f5db32db0968ea2c94f7ca35c996234b734e93ac89c3524190609f7d875688d8c2de090c57f89d6db
7
+ data.tar.gz: 672683ac4e29fff7a3853cd7fa347af080ef0ebb48ff2482c0e1284a5b5fb01cfc99dab69109409dbd6b1369454757c65c99fff7b27031f543b148be1ec0881b
@@ -6,7 +6,12 @@ module Fluent
6
6
  module Plugin
7
7
  class NaisKubewatchFilter < Fluent::Plugin::Filter
8
8
  Fluent::Plugin.register_filter('nais_kubewatch', self)
9
+ config_param :type_field, :string, default: "type"
9
10
 
11
+ def configure(conf)
12
+ super
13
+ end
14
+
10
15
  def filter(tag, time, record)
11
16
  if record['source'].is_a?(Hash)
12
17
  if record['source'].has_key?('host')
@@ -17,7 +22,7 @@ module Fluent
17
22
  end
18
23
  end
19
24
  record['event'] = record.delete('reason') if record.has_key?('reason')
20
- type = record.delete('type')
25
+ type = record.delete(@type_field)
21
26
  if type == 'Normal'
22
27
  record['level'] = 'Info'
23
28
  elsif !type.nil?
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module Nais
4
- VERSION = "0.36.0"
4
+ VERSION = "0.37.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-nais
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.36.0
4
+ version: 0.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terje Sannum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-23 00:00:00.000000000 Z
11
+ date: 2019-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd