fluent-plugin-aggregate 1.0.3 → 1.0.4
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/README.md +6 -0
- data/lib/fluent/plugin/filter_aggregate.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37dfdd5e7238394070b02a74b36a493c990f6977aa87b4e1f3171a5847817bef
|
4
|
+
data.tar.gz: 658f7b50fe5bf06a98e94b10d9001aee29ec71541074e6bbf966d2a982fd2894
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18b8d6104d35fb765fd993a525c2cc8486a68f603dabda73d2e259586818276b1ba8a7d6aac0093b6c4bbb4e4d973824ab961e77ba6587493d67209b29cd78b0
|
7
|
+
data.tar.gz: 7aefca28e2ac794a8b54bb5d6c56f1af929d4d8037452d6c90fbcacbcccea06a3a005cdbeaad44c051bdda586f9612e68d173045e1e1513f2d8b5474e3a66120
|
data/README.md
CHANGED
@@ -99,6 +99,12 @@ Example with dummy input.
|
|
99
99
|
</match>
|
100
100
|
```
|
101
101
|
### Advanced parameters
|
102
|
+
### processing_mode
|
103
|
+
#### Default: online
|
104
|
+
Mode for processing events (batch/online), for the online processing (useful for streaming processing), wait to arrive events (for example, interval of 5s, wait 5s + keep_interval to generate aggregate events), batch process don't wait.
|
105
|
+
```
|
106
|
+
processing_mode online
|
107
|
+
```
|
102
108
|
### time_field
|
103
109
|
#### Default: timestamp
|
104
110
|
Field that conatins time for the event.
|
@@ -23,6 +23,7 @@ module Fluent
|
|
23
23
|
config_param :temporary_status_file_path, :string, :default => nil, :desc => 'File to store aggregate information when the agent down'
|
24
24
|
config_param :load_temporarystatus_file_enabled, :bool, :default => true, :desc => 'Enable load saved data from file (if exist status file)'
|
25
25
|
config_param :processing_mode, :string, :default => 'online', :desc => 'Processing mode (batch/online)'
|
26
|
+
config_param :time_started_mode, :string, :default => 'first_event', :desc => 'Time started mode (first_event/last_event)'
|
26
27
|
|
27
28
|
VALID_AGGREGATIONS = ['sum','min','max','mean','median','variance','standard_deviation']
|
28
29
|
|
@@ -80,6 +81,7 @@ module Fluent
|
|
80
81
|
log.warn "temporary_status_file_path is empty, is recomended using to avoid lost statistic information beetween restarts." if @temporary_status_file_path.nil?
|
81
82
|
@aggregator_mutex = Mutex.new
|
82
83
|
@processing_mode_type=@processing_mode=='batch' ? :batch : :online
|
84
|
+
@time_started_mode_type=@time_started_mode=='first_event' ? :fist_event : :last_event
|
83
85
|
@data_operations = DataOperations::Aggregate.new(aggregator: @aggregator,
|
84
86
|
time_format: @time_format,
|
85
87
|
time_field: @time_field,
|
@@ -89,6 +91,7 @@ module Fluent
|
|
89
91
|
keep_interval: @keep_interval,
|
90
92
|
field_no_data_value: @field_no_data_value,
|
91
93
|
processing_mode: @processing_mode_type,
|
94
|
+
time_started_mode: @time_started_mode_type,
|
92
95
|
log: log,
|
93
96
|
aggregator_name: @aggregator_name,
|
94
97
|
aggregation_names: @aggregation_names,
|
@@ -101,8 +104,7 @@ module Fluent
|
|
101
104
|
begin
|
102
105
|
result = record unless ! emit_original_message
|
103
106
|
|
104
|
-
@data_operations.add_events(
|
105
|
-
result
|
107
|
+
@data_operations.add_events(record)
|
106
108
|
rescue => e
|
107
109
|
log.warn "failed to filter events", :error_class => e.class, :error => e.message
|
108
110
|
log.warn_backtrace
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-aggregate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- superguillen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|