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 +4 -4
- data/README.md +78 -0
- data/lib/fluent/plugin/filter_aggregate.rb +3 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 315a13ce5d02549af005fae36d985993b2576b9e749088b35236fd500805d77a
|
4
|
+
data.tar.gz: 2c487c7cf5297e8507365d8ab3f1154f10e7f48c4902c520fdcbbcc25b13c0ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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.
|
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-
|
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: []
|