fluent-plugin-aggregate 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '02971c8c4bc74515ae2e98a3190b527736955abb323c5384798b578ecc470fc7'
4
- data.tar.gz: 4eb3c9c2f5460886724dfd9dbc8893e834e326ac33df9cd518633f109236149b
3
+ metadata.gz: 315a13ce5d02549af005fae36d985993b2576b9e749088b35236fd500805d77a
4
+ data.tar.gz: 2c487c7cf5297e8507365d8ab3f1154f10e7f48c4902c520fdcbbcc25b13c0ea
5
5
  SHA512:
6
- metadata.gz: eabd29fda3fedd5e90993f2ca05ee9c67b19f2f1590d206b2749a5726d655e10a47d365b93b64cb5cc59305a46b707a4b3cd13c98eb5c2fdbba1b53b0f5217da
7
- data.tar.gz: 663bdd8ad0898e15634d33aec656a6552253d1cc3d1979b4acab078ffb315fec314e068729d33664c08c7ddeacad794a5f84d25924617f79c43b3979fcb89dca
6
+ metadata.gz: dca77fe1529761a3efbbecc5ba4a5c0d00a713ed9e90b5e0783c7a065421ec4a02a84646ee47cc1cd4bd4b8528afab57bc43501209896c7fb1fd4640d052d5c3
7
+ data.tar.gz: 4376c5c19e514b402f5902fcc739b0ca45669a91a1d1356f9fe8050b822429fda887bba1bc13964cfaa2f3d7b35749b062bb60423862bf05f36677ccee5ee5ad
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # fluent-plugin-aggregate , a plugin for [Fluentd](http://fluentd.org)
2
+ [![Build Status](https://api.travis-ci.org/superguillen/fluent-plugin-aggregate.svg?branch=master)](https://api.travis-ci.org/superguillen/fluent-plugin-aggregate)
2
3
 
3
4
  A fluentd plugin to aggregate events by fields over time.
4
5
 
@@ -63,3 +64,80 @@ Aggregate funtions to apply, this plugin support multiple aggregations fields.
63
64
  ```
64
65
  aggregations sum,min,max,mean,median,variance,standard_deviation
65
66
  ```
67
+ ### aggregate_event_tag
68
+ #### Default: aggregate
69
+ Tag prefix for events generated in the aggregation process. Full tag format is #{aggregate_event_tag}.#{interval}.
70
+ ```
71
+ aggregate_event_tag aggregate
72
+ ```
73
+ ### Example
74
+ Example with dummy input.
75
+ ```
76
+ <system>
77
+ workers 1
78
+ </system>
79
+ <source>
80
+ @type dummy
81
+ dummy {"tx":"test", "response_ms":500}
82
+ tag test
83
+ rate 1
84
+ </source>
85
+ <filter test>
86
+ @type aggregate
87
+ intervals 5s,10s
88
+ keep_interval 1s
89
+ group_fields tx
90
+ aggregate_fields response_ms
91
+ aggregator_suffix_name "aggregator#{worker_id}"
92
+ aggregate_event_tag aggregate
93
+ </filter>
94
+ <match test>
95
+ @type stdout
96
+ </match>
97
+ <match aggregate.**>
98
+ @type stdout
99
+ </match>
100
+ ```
101
+ ### Advanced parameters
102
+ ### time_field
103
+ #### Default: timestamp
104
+ Field that conatins time for the event.
105
+ ```
106
+ time_field timestamp
107
+ ```
108
+ ### time_format
109
+ #### Default: %Y-%m-%dT%H:%M:%S.%L%:z
110
+ Time format for the time_field.
111
+ ```
112
+ time_format %Y-%m-%dT%H:%M:%S.%L%:z
113
+ ```
114
+ ### output_time_format
115
+ #### Default: %Y-%m-%dT%H:%M:%S.%L%:z
116
+ Time format for the generated aggregated event.
117
+ ```
118
+ output_time_format %Y-%m-%dT%H:%M:%S.%L%:z
119
+ ```
120
+ ### field_no_data_value
121
+ #### Default: no_data
122
+ The value for group fields in the aggregate event no present in the original event.
123
+ ```
124
+ field_no_data_value no_data
125
+ ```
126
+ ### emit_original_message
127
+ #### Default: true
128
+ The value for group fields in the aggregate event no present in the original event.
129
+ ```
130
+ emit_original_message true
131
+ ```
132
+ ### temporary_status_file_path
133
+ #### Default: nil
134
+ File to store aggregate information when the agent down.
135
+ ```
136
+ temporary_status_file_path path_to_file.json
137
+ ```
138
+ ### load_temporarystatus_file_enabled
139
+ #### Default: true
140
+ Load file #{temporary_status_file_path} on startup.
141
+ ```
142
+ load_temporarystatus_file_enabled true
143
+ ```
@@ -19,6 +19,7 @@ module Fluent
19
19
  config_param :aggregations, :string, :default => 'sum,min,max,mean,median,variance,standard_deviation'
20
20
  config_param :temporary_status_file_path, :string, :default => nil, :desc => 'File to store aggregate information when the agent down'
21
21
  config_param :load_temporarystatus_file_enabled, :bool, :default => true, :desc => 'Enable load saved data from file (if exist status file)'
22
+ config_param :processing_mode, :string, :default => 'online', :desc => 'Processing mode (batch/online)'
22
23
 
23
24
  VALID_AGGREGATIONS = ['sum','min','max','mean','median','variance','standard_deviation']
24
25
 
@@ -74,6 +75,7 @@ module Fluent
74
75
 
75
76
  log.warn "temporary_status_file_path is empty, is recomended using to avoid lost statistic information beetween restarts." if @temporary_status_file_path.nil?
76
77
  @aggregator_mutex = Mutex.new
78
+ @processing_mode_type=@processing_mode=='batch' ? :batch : :online
77
79
  @data_operations = DataOperations::Aggregate.new(aggregator: @aggregator,
78
80
  time_format: @time_format,
79
81
  time_field: @time_field,
@@ -82,7 +84,7 @@ module Fluent
82
84
  flush_interval: @flush_interval,
83
85
  keep_interval: @keep_interval,
84
86
  field_no_data_value: @field_no_data_value,
85
- processing_mode: :online,
87
+ processing_mode: @processing_mode_type,
86
88
  log: log,
87
89
  aggregator_name: @aggregator_name,
88
90
  aggregation_names: @aggregation_names,
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.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - superguillen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-21 00:00:00.000000000 Z
11
+ date: 2020-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.9.2
61
+ - !ruby/object:Gem::Dependency
62
+ name: test-unit
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 3.0.8
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 3.0.8
61
75
  description: Filter aggregtation plugin for Fluent
62
76
  email: superguillen.public@gmail.com
63
77
  executables: []