Fluentd Input plugin to process message from sakura.io WebSocket API.
- Ruby >= 2.1
- Fluentd >= v0.14.0
gem install 'fluent-plugin-sakuraio'<source>
@type sakuraio
url wss://api.sakura.io/ws/v1/xxxxxxxxxxxxxxxxxxxxxxx
ping 60
</source>
channelstype messages:{module}.channels.{channel}connectionandlocationtype messages:{module}.{type}
channelstype messages:{"module":{module},"channel":{channel},"type":"{data type}","value":{value}}connectiontype messages:{"module":{module},"is_online":{is_online}}locationtype messages:{"module":{module},"latitude":{latitude},"longitude":"{longitude}","range_m":{range_m}}
The details of sakura.io message spec: https://sakura.io/docs/pages/platform-specification/message.html
<match **>
@type sakuraio
url wss://api.sakura.io/ws/v1/xxxxxxxxxxxxxxxxxxxxxxx
modules ["uXXXXXXXXXXX"] # array of modules
channels {"0": ["key", "i"]} # hash of channels {"channel number": ["key in record", "data type"]}
ping 60
</match>
The gem is available as open source under the terms of the MIT License.