fluent-plugin-aggregate 1.0.6 → 1.0.8
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 +17 -10
- 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: be70fca8ec632f9a08f29aa7249d98bd3dc74389c92052244f6e9a92c93b47d9
|
4
|
+
data.tar.gz: ed0c454ebbccc84ba813565aec3c8c1e69af3fa2d17a30072d5340e66373a0d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4ed6bdc1a44c882173062305acb97244dbb1bb5ef7756d82f9a91d7a7373679f5d95407dbbcb11f8c5a6d65a74926d2b5cbe2c366ead1f64c1ec0e0196feb0
|
7
|
+
data.tar.gz: f1524432eaafacb112fae34d442c3d50bc3a64c4234a39de67038edf6c5eaf091bb6b399dc16b588e4f354c9cd7c780df0ed1c502da944474a2ee5f77b100deb
|
@@ -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 "
|
69
|
-
|
70
|
-
log.info "
|
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."
|
72
|
+
elsif @aggregation_names.include?("histogram") && !(histogram_buckets.empty? || histogram_fields.empty?)
|
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.8
|
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
|