fluent-plugin-cloudwatch-ingest 0.1.28 → 0.1.29
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb42921ca68077f523331fc4aa6d81eb01f7dd91
|
4
|
+
data.tar.gz: bfc0061afb856ab4b05184633898b437fa8bc291
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64af3616a263fdc4d3524e67fb338ca8a91a666d279fa06ff91ca5129be5df2212fcfec003fad47c845561d215ec383dcbd63f858a18f77d0a2bedc3446fe28a
|
7
|
+
data.tar.gz: 597ddbcff66f381ea71a830b4db72fc1f5b3273385326c85abbdff612c6609abcef611f3d955f3eae62abff82fef952312e62115a7b5597fd4de0495313ba088
|
@@ -9,7 +9,7 @@ require 'psych'
|
|
9
9
|
module Fluent::Plugin
|
10
10
|
class CloudwatchIngestInput < Fluent::Plugin::Input
|
11
11
|
Fluent::Plugin.register_input('cloudwatch_ingest', self)
|
12
|
-
helpers :compat_parameters
|
12
|
+
helpers :compat_parameters, :parser
|
13
13
|
|
14
14
|
desc 'The region of the source cloudwatch logs'
|
15
15
|
config_param :region, :string, default: 'us-east-1'
|
@@ -39,10 +39,8 @@ module Fluent::Plugin
|
|
39
39
|
|
40
40
|
def configure(conf)
|
41
41
|
super
|
42
|
-
|
43
|
-
|
44
|
-
@parser.configure(conf)
|
45
|
-
end
|
42
|
+
compat_parameters_convert(conf, :parser)
|
43
|
+
@parser = parser_create
|
46
44
|
log.info('Configured fluentd-plugin-cloudwatch-ingest')
|
47
45
|
end
|
48
46
|
|
@@ -79,13 +77,12 @@ module Fluent::Plugin
|
|
79
77
|
private
|
80
78
|
|
81
79
|
def emit(event)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
end
|
80
|
+
time, record = @parser.parse(event.message)
|
81
|
+
unless time # If the time isn't parsed from
|
82
|
+
time = event.time / 1000 # the record then take it from
|
83
|
+
end # the Cloudwatch event timestamp
|
84
|
+
|
85
|
+
router.emit(@tag, time, record[1])
|
89
86
|
end
|
90
87
|
|
91
88
|
def log_groups(log_group_prefix)
|