fluent-plugin-splunk-ex-logentries 1.0.1.logentries.4 → 1.0.1.logentries.5

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
  SHA256:
3
- metadata.gz: b7fa86098c0a346634ab8c3b5cbdecc50e238f57bc9b16a8845cf677aeb1fd19
4
- data.tar.gz: be9c08b03024a1581d68f2040d245d2426dc10689c22191da31f3b129a8cad59
3
+ metadata.gz: bae34fe898a416183b62086c3918c1c711788484ae9183c16b051799ced765fa
4
+ data.tar.gz: 9c56f3049fa4f3cbd7d3c3c2513a17dd5283b87d5c7b1923c935a0a5efa6ad37
5
5
  SHA512:
6
- metadata.gz: 62ccce64854db01f134164f7d1d8b7159295506cb5afe0e8c4c763e775f2c8a1206563a83ada3d29675b7dede19c1b4d22d56322ec024550da3249397c9b7639
7
- data.tar.gz: 1c6de75abbc1f85ad081c3e1ca59ae34f8ba1779cef1e9fd98d2b3a04f075e9132997c8532a727119da5e2c9b4788e8bfc3ed1c98a504b4b18ac3e823263b053
6
+ metadata.gz: cc58443d789d0fd0718e815645d5ba370d41148b22f92c2c1a3aa90c880eec22da15322567861c59628cacf449124ec7eaf5dfc05a7c7c08bbf0b802dd89df25
7
+ data.tar.gz: dc4c1a525423e34e65953d0f954fa3abac821f7e47da1480c62ac4dda994d049add55ceb1fb3492e2f4d8fbd98a3dc60a26cb992a39233c860fb46c7d8f74538
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-splunk-ex-logentries"
5
- gem.version = "1.0.1.logentries.4"
5
+ gem.version = "1.0.1.logentries.5"
6
6
 
7
7
  gem.authors = ["Trevor Gattis"]
8
8
  gem.email = "github@trevorgattis.com"
@@ -95,9 +95,24 @@ class Fluent::SplunkExOutput < Fluent::Output
95
95
  end
96
96
 
97
97
  def self.format_logentries(record)
98
- label = record["kubernetes"]["labels"]["logentries"]
99
- host = record["kubernetes"]["host"]
100
- message = record["message"]
98
+ if record["kubernetes"] && record["kubernetes"]["labels"] && record["kubernetes"]["labels"]["logentries"]
99
+ label = record["kubernetes"]["labels"]["logentries"]
100
+ else
101
+ label = nil
102
+ end
103
+
104
+ if record["kubernetes"] && record["kubernetes"]["host"]
105
+ host = record["kubernetes"]["host"]
106
+ else
107
+ host = nil
108
+ end
109
+
110
+ if record["message"]
111
+ message = record["message"]
112
+ else
113
+ message = nil
114
+ end
115
+
101
116
  le_out_str = "\"" + label.to_s + "\" " + host.to_s + " " + message.to_s
102
117
  end
103
118
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-splunk-ex-logentries
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.logentries.4
4
+ version: 1.0.1.logentries.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Gattis