re-assembe a stream data (for Fluentd output plugin)
Overview
Installation
Configuration
<match pattern>
type reassemble
output_tag OUTPUT_TAG
assemble CONFIGURATION_FOR_REASSEMBLE
null_to_null true or false (default false)
null_to_empty true or false (default false)
datetime_format DATETIME_FORMAT (default '%Y/%m/%d %H:%M:%S' / used in operation = 'unixtime_to_datetime')
date_format DATE_FORMAT (default '%Y/%m/%d' / used in operation = 'unixtime_to_date')
time_format TIME_FORMAT (default '%H:%M:%S' / used in operation = 'unixtime_to_time')
tz TIMEZONE(default :local)
</match>
‘assemble’ format
{extract_key1}:{replaced_key1}:{operation1},{extract_key2}:{replaced_key2}:{operation2},....{extract_keyN}:{replaced_keyN}:{operationN}
ex1.
assemble foo1:bar1:to_i, foo2:bar2:to_s
record => {"foo1": "1", "foo2": 2}
reassemble => {"bar1": 1, "bar2": "2"}
ex2.
assemble foo1,foo2:,foo3:bar3:unixtime_to_datetime,foo4:bar4:url_to_host
record => {"foo1": "1", "foo2": 2, "foo3": 1377946931, "foo4": "http://www.sada.co.jp/concert.html"}
reassemble => {"foo1": "1", "bar2": 2, "bar3": "2013-08-31 20:00:02", "bar4": "www.sada.co.jp"}
‘operation’ list
- to_s
-
to string
- to_i
-
to integer
- to_f
-
to float
- unixtime_to_datetime
-
convert from unixtime to datetime(string)
- unixtime_to_date
-
convert from unixtime to date(string)
- unixtime_to_time
-
convert from unixtime to time(string)
- url_to_domain
-
extract host from url
- url_to_host
-
extract host from url
- url_to_path
-
extract path from url
- bool_to_i
-
convert from bool to integer (true -> 1 / false -> 0)
- add_
-
addition (original value + integer)
- sub_
-
subtraction (original value - integer)
- mul_
-
multiplication (original value * integer)
- div_
-
division (original value / integer)
Copyright
- Copyright
-
Copyright © 2013 moaikids
- License
-
Apache License, Version 2.0