fluent-plugin-sakuraio 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/fluent-plugin-sakuraio.gemspec +1 -1
- data/lib/fluent/plugin/in_sakuraio.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7192fc68701dbba7439d09b9904c8ba1e1dad910
|
|
4
|
+
data.tar.gz: b32997b1e8f3e02e152e5ac020e9237e5bc8d4c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9258b69bf1c74cb1a10efd7c95328558763da025abce7028ae748b6bf0c23fdd3ee17a0a662299642bf139a0eb7aa8db9534269afd5dc26d4121069054f000ed
|
|
7
|
+
data.tar.gz: addeaf81f1dbb421ad747b5c4c6619fa909527337936ecaa26a5366fef79f1cd6bb2d19ca1926e64bbf59563e3e65a661e3626253403fc2af70c71b98e1bf690
|
|
@@ -15,6 +15,7 @@ module Fluent::Plugin
|
|
|
15
15
|
def configure(conf)
|
|
16
16
|
super
|
|
17
17
|
|
|
18
|
+
@time_parser = Fluent::TimeParser.new(nil)
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def start
|
|
@@ -80,7 +81,7 @@ module Fluent::Plugin
|
|
|
80
81
|
'module' => j['module'],
|
|
81
82
|
'is_online' => j['payload']['is_online']
|
|
82
83
|
},
|
|
83
|
-
'time' =>
|
|
84
|
+
'time' => @time_parser.parse(j['datetime'])
|
|
84
85
|
}
|
|
85
86
|
records.push(record)
|
|
86
87
|
records
|
|
@@ -97,7 +98,7 @@ module Fluent::Plugin
|
|
|
97
98
|
'longitude' => c['longitude'],
|
|
98
99
|
'range_m' => c['range_m']
|
|
99
100
|
},
|
|
100
|
-
'time' =>
|
|
101
|
+
'time' => @time_parser.parse(j['datetime'])
|
|
101
102
|
}
|
|
102
103
|
records.push(record)
|
|
103
104
|
end
|
|
@@ -105,7 +106,7 @@ module Fluent::Plugin
|
|
|
105
106
|
end
|
|
106
107
|
|
|
107
108
|
def parse_channels(records, j)
|
|
108
|
-
message_time =
|
|
109
|
+
message_time = @time_parser.parse(j['datetime'])
|
|
109
110
|
tag = j['module']
|
|
110
111
|
j['payload']['channels'].each do |c|
|
|
111
112
|
record = {
|
|
@@ -116,7 +117,7 @@ module Fluent::Plugin
|
|
|
116
117
|
'type' => c['type'],
|
|
117
118
|
'value' => c['value']
|
|
118
119
|
},
|
|
119
|
-
'time' =>
|
|
120
|
+
'time' => @time_parser.parse(c['datetime']) || message_time
|
|
120
121
|
}
|
|
121
122
|
records.push(record)
|
|
122
123
|
end
|