File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 22require "date"
33require "logstash/codecs/base"
44require "logstash/namespace"
5+ require "logstash/errors"
56require "tempfile"
67require "time"
78
@@ -75,20 +76,20 @@ class LogStash::Codecs::Collectd < LogStash::Codecs::Base
7576
7677 COLLECTD_TYPE_FIELDS = {
7778 'host' => true ,
78- '@timestamp' => true ,
79- 'plugin' => true ,
79+ '@timestamp' => true ,
80+ 'plugin' => true ,
8081 'plugin_instance' => true ,
8182 }
8283
8384 INTERVAL_VALUES_FIELDS = {
84- "interval" => true ,
85+ "interval" => true ,
8586 "values" => true ,
8687 }
8788
8889 INTERVAL_BASE_FIELDS = {
8990 'host' => true ,
9091 'collectd_type' => true ,
91- 'plugin' => true ,
92+ 'plugin' => true ,
9293 'plugin_instance' => true ,
9394 '@timestamp' => true ,
9495 'type_instance' => true ,
@@ -360,7 +361,7 @@ def decode(payload)
360361 length = ( ( payload . slice! ( 0 ) << 8 ) + payload . slice! ( 0 ) ) - 4
361362 # Validate that the part length is correct
362363 raise ( HeaderError ) if length > payload . length
363-
364+
364365 body = payload . slice! ( 0 ..length -1 )
365366
366367 field = TYPEMAP [ typenum ]
@@ -438,4 +439,4 @@ def decode(payload)
438439 # basically do nothing, we just want out
439440 end # def decode
440441
441- end # class LogStash::Codecs::Collectd
442+ end # class LogStash::Codecs::Collectd
You can’t perform that action at this time.
0 commit comments