README.md in fluent-plugin-groupcounter-0.2.0 vs README.md in fluent-plugin-groupcounter-0.2.1
- old
+ new
@@ -5,11 +5,11 @@
## Configuration
Assume inputs are coming as followings:
apache.access: {"code":"200", "method":"GET", "path":"/index.html", "reqtime":"1.001" }
- apache.access: {"code":"404", "method":"GET", "path":"/foo.html", "reqtime":"2.002" }
+ apache.access: {"code":"202", "method":"GET", "path":"/foo.html", "reqtime":"2.002" }
apache.access: {"code":"200", "method":"GET", "path":"/index.html", "reqtime":"3.003" }
Think of quering `SELECT COUNT(\*) GROUP BY code,method,path`. Configuration becomes as below:
<match apache.access>
@@ -20,11 +20,11 @@
group_by_keys code,method,path
</match>
Output becomes like
- groupcounter.apache.access: {"200_GET_/index.html_count":2, "404_GET_/foo.html_count":1}
+ groupcounter.apache.access: {"200_GET_/index.html_count":2, "202_GET_/foo.html_count":1}
## Parameters
* group\_by\_keys (semi-required)
@@ -32,10 +32,20 @@
* delimiter
Specify the delimiter to join `group_by_keys`. Default is '_'.
+* pattern\[1-20\]
+
+ Use `patternX` option to apply grouping more roughly. For example, adding a configuration for the above example as below
+
+ pattern1 2xx ^2\d\d
+
+ gives you an ouput like
+
+ groupcounter.apache.access: {"2xx_GET_/index.html_count":3}
+
* group\_by\_expression (semi-required)
Use an expression to group the event record. `group_by_keys` or `group_by_expression` is required.
For examples, for the exampled input above, the configuration as below
@@ -87,10 +97,10 @@
max_key reqtime
gives you an output like
- groupcounter.apache.access: {"200_GET_/index.html_reqtime_max":3.003, "404_GET_/foo.html_reqtime_max":2.002}
+ groupcounter.apache.access: {"200_GET_/index.html_reqtime_max":3.003, "202_GET_/foo.html_reqtime_max":2.002}
* min\_key
Specify key name in the event record to do `SELECT COUNT(\*),MIN(key_name) GROUP BY`.