fluent-plugin-mqtt-io 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/fluent-plugin-mqtt-io.gemspec +1 -1
- data/lib/fluent/plugin/in_mqtt.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7acf8fbbfbb33e609608751a49d4cf4b97ec0b5
|
4
|
+
data.tar.gz: a03ffed38eb93fa059f9b415bf58208fb7616b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93ae1aec473651c34c0c9398b144b7d832e1691d73844f6dc4a840df5740b786ca209c3f4484b5e1327b94d541ae74fde1cd40f30bb545ba385a7c33bef355e5
|
7
|
+
data.tar.gz: 194bd3a8c5665788276f95ddb9dc1a99d89511b3e725f496af414e376385df2d44b07fcc1c169300f5fbac1c0364f1aca5938c52e75193beeaf77376296d57cb
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ Input Plugin can be used via source directive in the configuration.
|
|
34
34
|
|
35
35
|
<source>
|
36
36
|
type mqtt
|
37
|
-
|
37
|
+
host 127.0.0.1
|
38
38
|
port 1883
|
39
39
|
format json
|
40
40
|
</source>
|
@@ -43,7 +43,7 @@ Input Plugin can be used via source directive in the configuration.
|
|
43
43
|
|
44
44
|
The default MQTT topic is "#". Configurable options are the following:
|
45
45
|
|
46
|
-
-
|
46
|
+
- host: IP address of MQTT broker
|
47
47
|
- port: Port number of MQTT broker
|
48
48
|
- format (mandatory): Input parser can be chosen, e.g. json, xml
|
49
49
|
- In order to use xml format, you need to install [fluent-plugin-xml-parser](https://github.com/toyokazu/fluent-plugin-xml-parser).
|
@@ -75,7 +75,7 @@ Output Plugin can be used via match directive.
|
|
75
75
|
|
76
76
|
```
|
77
77
|
|
78
|
-
The options are basically the same as Input Plugin except for "
|
78
|
+
The options are basically the same as Input Plugin except for "format" and "bulk_trans" (only for Input). Additional options for Output Plugin are the following.
|
79
79
|
|
80
80
|
- time_key: An attribute name used for timestamp field genarated from fluentd time field. Default is nil (omitted).
|
81
81
|
If this option is omitted, timestamp field is not appended to the output record.
|
@@ -134,7 +134,7 @@ As described in the figure, fluent-plugin-mqtt-io, fluent-plugin-xml-parser and
|
|
134
134
|
```
|
135
135
|
<source>
|
136
136
|
type mqtt
|
137
|
-
|
137
|
+
host 192.168.1.100
|
138
138
|
port 1883
|
139
139
|
topic 'Libelium/+/+'
|
140
140
|
format xml
|
@@ -192,7 +192,7 @@ Sometimes, MQTT message conversion must be done in the network because the proce
|
|
192
192
|
```
|
193
193
|
<source>
|
194
194
|
type mqtt
|
195
|
-
|
195
|
+
host 192.168.1.100
|
196
196
|
port 1883
|
197
197
|
topic 'Libelium/+/+'
|
198
198
|
format xml
|
@@ -3,7 +3,7 @@ module Fluent
|
|
3
3
|
Plugin.register_input('mqtt', self)
|
4
4
|
|
5
5
|
config_param :port, :integer, :default => 1883
|
6
|
-
config_param :
|
6
|
+
config_param :host, :string, :default => '127.0.0.1'
|
7
7
|
config_param :topic, :string, :default => '#'
|
8
8
|
config_param :format, :string, :default => 'json'
|
9
9
|
config_param :bulk_trans, :bool, :default => true
|
@@ -25,7 +25,7 @@ module Fluent
|
|
25
25
|
|
26
26
|
def configure(conf)
|
27
27
|
super
|
28
|
-
@
|
28
|
+
@host ||= conf['host']
|
29
29
|
@topic ||= conf['topic']
|
30
30
|
@bulk_trans ||= conf['bulk_trans']
|
31
31
|
@bulk_trans_sep ||= conf['bulk_trans_sep']
|
@@ -59,9 +59,9 @@ module Fluent
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def start
|
62
|
-
$log.debug "start mqtt #{@
|
62
|
+
$log.debug "start mqtt #{@host}"
|
63
63
|
opts = {
|
64
|
-
host: @
|
64
|
+
host: @host,
|
65
65
|
port: @port,
|
66
66
|
username: @username,
|
67
67
|
password: @password,
|