README.md in fluent-plugin-twilio-0.0.3 vs README.md in fluent-plugin-twilio-0.1.0
- old
+ new
@@ -1,21 +1,31 @@
fluent-plugin-twilio
=====================
## Overview
Fluentd Output plugin to make a call with twilio.
+Twilio free trial is available to signup at the official website.
+You can try call to your cellphone for free!
+## Requirements
+
+| fluent-plugin-twilio | fluentd | ruby |
+|----------------------|-------------|--------|
+| >= 0.1.0 | >= v0.14.15 | >= 2.1 |
+| < 0.1.0 | >= v0.12.0 | >= 1.9 |
+
+
## Installation
-install with gem or fluent-gem command as:
+install with gem or td-agent-gem command as:
`````
-### system installed gem
-gem install fluent-plugin-twilio
+### for local fluentd
+$ gem install fluent-plugin-twilio
-### td-agent bundled gem
-/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-twilio
+### for td-agent2 (standard)
+$ sudo td-agent-gem install fluent-plugin-twilio
`````
## Configuration
### Message Format
@@ -27,16 +37,16 @@
`````
### Sample
`````
<source>
- type http
+ @type http
port 8888
</source>
<match notify.call>
- type twilio
+ @type twilio
# Set account Sid and Token from twilio.com/user/account
account_sid TWILIO_ACCOUNT_SID # Required
auth_token TWILIO_AUTH_TOKEN # Required
@@ -45,13 +55,38 @@
# Set defaults of making outbound call.
# To call multiple phone at the same time, list them with comma like below.
default_number +819012345678,+818012345678 # Optional
- # Set log level to prevent info error for Fluentd v0.10.43 or later.
- log_level warn
+ # Set log level to prevent info error
+ @log_level warn
</match>
`````
+
+### Sample to customize messages
+
+You can customize message using [filter_record_transformer](http://docs.fluentd.org/v0.14/articles/filter_record_transformer).
+
+```
+<source>
+ @type http
+ port 8888
+ @label @NOTIFY
+</source>
+
+<label @NOTIFY>
+ <filter>
+ @type record_transformer
+ <record>
+ message Hi. ${record["name"]} has made a order of ${record["item"]} just now.
+ </record>
+ </filter>
+ <match>
+ @type twilio
+ # snip ...
+ </match>
+</label>
+```
### Quick Test
`````
# test call to +819012345678 and say "Help! System ABC has down." with woman voice.
$ curl http://localhost:8888/notify.call -F 'json={"number":"+819012345678","voice":"woman","message":"Help! System ABC has down."}'