fluent-plugin-unique-counter 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/README.md +51 -6
- data/fluent-plugin-unique-counter.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e69df99baab53cedc05f3ffac95caaebdc554888
|
|
4
|
+
data.tar.gz: be204591935a1cdf5a1a0954678cce26c6c84de5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f73708eb24c4543a91d9fa03f6f716d8fc76f9504b251923d9aea66a68ad59192a12010627c4e95ee95c6a9083d7c713f86878add5c753b86630bb5392d227d
|
|
7
|
+
data.tar.gz: 13e92132c3d95951c8eb74b12ebfa7638ef751ec799b8a25236d130da490b3644641e9e74f6d1aaaa0b8e5bb6eba8695a06385647b7a0e199dbb54ee63627da9
|
data/.travis.yml
ADDED
data/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Fluent unique counter plugin
|
|
1
|
+
# Fluent unique counter plugin [](https://travis-ci.org/aiming/fluent-plugin-unique-counter)
|
|
2
2
|
|
|
3
3
|
This plugin purpose is simple monitoring (countup only).
|
|
4
4
|
This was referred from [fluent-plugin-numeric-counter](https://github.com/tagomoris/fluent-plugin-numeric-counter). Thanks! :)
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Contributors
|
|
7
7
|
|
|
8
8
|
- [@takesato](https://github.com/takesato)
|
|
9
9
|
- [@futoase](https://github.com/futoase)
|
|
@@ -22,21 +22,62 @@ Or install it yourself as:
|
|
|
22
22
|
|
|
23
23
|
$ gem install fluent-plugin-unique-counter
|
|
24
24
|
|
|
25
|
+
## How to use
|
|
26
|
+
|
|
27
|
+
- create fluentd config file
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
<source>
|
|
31
|
+
type forward
|
|
32
|
+
port 24224
|
|
33
|
+
</source>
|
|
34
|
+
|
|
35
|
+
<match test.api.*>
|
|
36
|
+
type unique_counter
|
|
37
|
+
tag count.up
|
|
38
|
+
unique_key user_id
|
|
39
|
+
unit minutes
|
|
40
|
+
</match>
|
|
41
|
+
|
|
42
|
+
<match count.up>
|
|
43
|
+
type file
|
|
44
|
+
path fluent/count-up.log
|
|
45
|
+
</match>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- send test data
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
echo '{"user_id": 1000}' | fluent-cat test.api.uga
|
|
52
|
+
echo '{"user_id": 1000}' | fluent-cat test.api.uga
|
|
53
|
+
echo '{"user_id": 1000}' | fluent-cat test.api.uga
|
|
54
|
+
echo '{"user_id": 1002}' | fluent-cat test.api.uga
|
|
55
|
+
echo '{"user_id": 1002}' | fluent-cat test.api.uga
|
|
56
|
+
echo '{"user_id": 1003}' | fluent-cat test.api.uga
|
|
57
|
+
echo '{"user_id": 1003}' | fluent-cat test.api.uga
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- result (count-up.log)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
2013-10-21T22:07:08+09:00 count.up {"unique_count":3}
|
|
64
|
+
```
|
|
65
|
+
|
|
25
66
|
## confing params
|
|
26
67
|
|
|
27
|
-
-
|
|
68
|
+
- count_interval
|
|
28
69
|
|
|
29
70
|
This interval time to monitoring. Default setting is ```60sec```.
|
|
30
71
|
|
|
31
|
-
-
|
|
72
|
+
- unit
|
|
32
73
|
|
|
33
74
|
Monitoring specific interval an unit. Selectable setting is ```minutes```, ```hours``` and ```days```.
|
|
34
75
|
|
|
35
|
-
-
|
|
76
|
+
- unique_key
|
|
36
77
|
|
|
37
78
|
Monitoring key name.
|
|
38
79
|
|
|
39
|
-
-
|
|
80
|
+
- tag
|
|
40
81
|
|
|
41
82
|
Output tag name. Default setting is ```unique_count```.
|
|
42
83
|
|
|
@@ -47,3 +88,7 @@ Apache License v2.0.
|
|
|
47
88
|
## Copylight
|
|
48
89
|
|
|
49
90
|
Copylight (c) 2013 Aiming Inc.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
94
|
+
|
|
@@ -4,12 +4,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "fluent-plugin-unique-counter"
|
|
7
|
-
spec.version = "0.1.
|
|
7
|
+
spec.version = "0.1.1"
|
|
8
8
|
spec.authors = ["Keiji Matsuzaki"]
|
|
9
9
|
spec.email = ["futoase@gmail.com"]
|
|
10
10
|
spec.summary = %q{fluentd unique counter plugin.}
|
|
11
11
|
spec.description = %q{This plugin is use of count up to unique attribute.}
|
|
12
|
-
spec.homepage = ""
|
|
12
|
+
spec.homepage = "http://aiming.github.io/fluent-plugin-unique-counter/"
|
|
13
13
|
spec.license = "Apache License v2.0"
|
|
14
14
|
|
|
15
15
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-unique-counter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Keiji Matsuzaki
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-10-
|
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -74,6 +74,7 @@ extensions: []
|
|
|
74
74
|
extra_rdoc_files: []
|
|
75
75
|
files:
|
|
76
76
|
- .gitignore
|
|
77
|
+
- .travis.yml
|
|
77
78
|
- Gemfile
|
|
78
79
|
- LICENSE.txt
|
|
79
80
|
- README.md
|
|
@@ -82,7 +83,7 @@ files:
|
|
|
82
83
|
- lib/fluent/plugin/out_unique_counter.rb
|
|
83
84
|
- test/helper.rb
|
|
84
85
|
- test/test_unique_counter.rb
|
|
85
|
-
homepage:
|
|
86
|
+
homepage: http://aiming.github.io/fluent-plugin-unique-counter/
|
|
86
87
|
licenses:
|
|
87
88
|
- Apache License v2.0
|
|
88
89
|
metadata: {}
|