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 +4 -4
- data/lib/fluent/plugin/filter_nais_kubewatch.rb +6 -1
- data/lib/fluent/plugin/nais/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e33891de2aa93233e1a8ffde64473710209634f0
|
4
|
+
data.tar.gz: 656c8cbcbc9222f312ac80d8161f555fbe7aefbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
25
|
+
type = record.delete(@type_field)
|
21
26
|
if type == 'Normal'
|
22
27
|
record['level'] = 'Info'
|
23
28
|
elsif !type.nil?
|
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.
|
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-
|
11
|
+
date: 2019-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|