fluent-plugin-datacalculator 0.0.0 → 0.0.1
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.
- data/example.conf +6 -12
- data/fluent-plugin-datacalculator.gemspec +1 -1
- data/lib/fluent/plugin/out_datacalculator.rb +1 -1
- metadata +1 -1
data/example.conf
CHANGED
@@ -2,18 +2,12 @@
|
|
2
2
|
type forward
|
3
3
|
</source>
|
4
4
|
<match payment.**>
|
5
|
-
type
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
tag result
|
12
|
-
count_interval 5s
|
13
|
-
aggregate all
|
14
|
-
formulas sum = amount * price, cnt = 1, total = amount
|
15
|
-
finalizer ave = cnt > 0 ? 1.00 * sum / cnt : 0
|
16
|
-
</store>
|
5
|
+
type datacalculator
|
6
|
+
tag result
|
7
|
+
count_interval 5s
|
8
|
+
aggregate all
|
9
|
+
formulas sum = amount * price, cnt = 1, total = amount
|
10
|
+
finalizer ave = cnt > 0 ? 1.00 * sum / cnt : 0
|
17
11
|
</match>
|
18
12
|
|
19
13
|
<match result>
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-datacalculator"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.1"
|
7
7
|
s.authors = ["Muddy Dixon"]
|
8
8
|
s.email = ["muddydixon@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/muddydixon/fluent-plugin-datacalculator"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Fluent::DataCalculatorOutput < Fluent::Output
|
2
|
-
Fluent::Plugin.register_output('
|
2
|
+
Fluent::Plugin.register_output('datacalculator', self)
|
3
3
|
|
4
4
|
config_param :count_interval, :time, :default => nil
|
5
5
|
config_param :unit, :string, :default => 'minute'
|