fluent-plugin-http-enhanced 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.description = "Enhanced HTTP input plugin for Fluent event collector"
|
6
6
|
gem.homepage = "https://github.com/parolkar/fluent-plugin-http-enhanced"
|
7
7
|
gem.summary = gem.description
|
8
|
-
gem.version = "0.0.
|
8
|
+
gem.version = "0.0.3"
|
9
9
|
gem.authors = ["Abhishek Parolkar"]
|
10
10
|
gem.email = "abhishek@parolkar.com"
|
11
11
|
gem.has_rdoc = false
|
@@ -18,8 +18,11 @@ module Fluent
|
|
18
18
|
time = params['time']
|
19
19
|
time ||= params['t']
|
20
20
|
time = time.to_i
|
21
|
-
|
22
|
-
|
21
|
+
engine_time = Engine.now
|
22
|
+
|
23
|
+
if time == 0 || ((time - engine_time.to_i).abs > 1800)
|
24
|
+
#(time - engine_time.to_i).abs > 1800 ensures that the time supplied in the event is not off by 30 mins. This will safe guard situations where devices are reporting incorrect timestamp, such a timestamp is corrected to engine's current time.
|
25
|
+
time = engine_time
|
23
26
|
end
|
24
27
|
rescue
|
25
28
|
return ["400 Bad Request", {'Content-type'=>'text/plain'}, "400 Bad Request\n#{$!}\n"]
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: fluent-plugin-http-enhanced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Abhishek Parolkar
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-01
|
13
|
+
date: 2012-02-01 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|