fluent-plugin-aggregate 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/filter_aggregate.rb +16 -9
- 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: ff4262edfbc1945927d465b1f34e38278d13484d398aad2b9173d7c220fa84f2
|
4
|
+
data.tar.gz: 2420c8fe2fc068c687f079160b715f5a2aff241ea93e683778914a013d368480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9709940af312a262d055e5385778152cc9311db64b7d367d2c8b6af09c96ef1a7190c95efb23096ffb02b1c6f6865cf8a43adbb67a0f0e5274d40e296dcce5cf
|
7
|
+
data.tar.gz: a47d4d91bf545dfd2d914aa623cffb4484851a4a0080c7da01327babeca1188cf81a31c8ed7da989d2418526226b130a75070242bb284bf05a5ab189fc2f397b
|
@@ -20,14 +20,17 @@ module Fluent
|
|
20
20
|
config_param :emit_original_message, :bool, :default => true
|
21
21
|
config_param :aggregate_event_tag, :string, :default => 'aggregate'
|
22
22
|
config_param :aggregations, :array, :default => ['sum','min','max','mean','median','variance','standard_deviation'], value_type: :string
|
23
|
-
config_param :
|
24
|
-
config_param :
|
23
|
+
config_param :histogram_buckets, :array, :default => [], value_type: :integer
|
24
|
+
config_param :histogram_fields, :array, :default => [], value_type: :string
|
25
|
+
config_param :histogram_cumulative, :bool, :default => false
|
26
|
+
config_param :histogram_bucket_infinite_enabled, :bool, :default => false
|
27
|
+
config_param :histogram_bucket_comparation, :string, :default => 'less_or_equal'
|
25
28
|
config_param :temporary_status_file_path, :string, :default => nil, :desc => 'File to store aggregate information when the agent down'
|
26
29
|
config_param :load_temporarystatus_file_enabled, :bool, :default => true, :desc => 'Enable load saved data from file (if exist status file)'
|
27
30
|
config_param :processing_mode, :string, :default => 'online', :desc => 'Processing mode (batch/online)'
|
28
31
|
config_param :time_started_mode, :string, :default => 'first_event', :desc => 'Time started mode (first_event/last_event)'
|
29
32
|
|
30
|
-
VALID_AGGREGATIONS = ['sum','min','max','mean','median','variance','standard_deviation','
|
33
|
+
VALID_AGGREGATIONS = ['sum','min','max','mean','median','variance','standard_deviation','histogram']
|
31
34
|
|
32
35
|
def initialize
|
33
36
|
super
|
@@ -60,14 +63,14 @@ module Fluent
|
|
60
63
|
|
61
64
|
@aggregation_names.each {|operation|
|
62
65
|
if ! VALID_AGGREGATIONS.include?(operation)
|
63
|
-
raise Fluent::ConfigError, "aggregations must set any combination of sum,min,max,mean,median,variance,standard_deviation
|
66
|
+
raise Fluent::ConfigError, "aggregations must set any combination of sum,min,max,mean,median,variance,standard_deviation,histogram"
|
64
67
|
end
|
65
68
|
}
|
66
69
|
|
67
|
-
if @aggregation_names.include?("
|
68
|
-
log.warn "
|
70
|
+
if @aggregation_names.include?("histogram") && (histogram_buckets.empty? || histogram_fields.empty?)
|
71
|
+
log.warn "histogram aggregation disabled, need histogram_buckets & histogram_fields parameters to work, please review documentation."
|
69
72
|
else
|
70
|
-
log.info "
|
73
|
+
log.info "histogram aggregation enabled, bucket count histogram_fields with values (le|ge) histogram_buckets parameter"
|
71
74
|
end
|
72
75
|
|
73
76
|
@aggregator = {}
|
@@ -90,6 +93,7 @@ module Fluent
|
|
90
93
|
@aggregator_mutex = Mutex.new
|
91
94
|
@processing_mode_type=@processing_mode=='batch' ? :batch : :online
|
92
95
|
@time_started_mode_type=@time_started_mode=='first_event' ? :fist_event : :last_event
|
96
|
+
@histogram_bucket_comparation_mode=@histogram_bucket_comparation=='less_or_equal' ? :less_or_equal : :greater_or_equal
|
93
97
|
@data_operations = DataOperations::Aggregate.new(aggregator: @aggregator,
|
94
98
|
time_format: @time_format,
|
95
99
|
time_field: @time_field,
|
@@ -105,8 +109,11 @@ module Fluent
|
|
105
109
|
aggregation_names: @aggregation_names,
|
106
110
|
group_field_names: @group_field_names,
|
107
111
|
aggregate_field_names: @aggregate_field_names,
|
108
|
-
|
109
|
-
|
112
|
+
histogram_buckets: @histogram_buckets,
|
113
|
+
histogram_fields: @histogram_fields,
|
114
|
+
histogram_cumulative: @histogram_cumulative,
|
115
|
+
histogram_bucket_infinite_enabled: @histogram_bucket_infinite_enabled,
|
116
|
+
histogram_bucket_comparation: @histogram_bucket_comparation_mod
|
110
117
|
)
|
111
118
|
end
|
112
119
|
|
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.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- superguillen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|