1、acl.config文件定义了可订阅$SYS主题的权限。
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}. {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}. %%%{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}. {allow, all}.
2、打开文件vm.args,把节点名称修改为:
#-name emqttd@127.0.0.1 -name emqttd@172.16.6.161
acl.config文件第三行默认是禁止客户端订阅$SYS/#主题。我们把它注释掉。开启一个客户端,订阅$SYS/#主题,消息如下:
源码参见-module(emqttd_broker)这个模块,它会每秒钟publish消息,主题关键字有uptime和datetime等。
源码参见-module(emqttd_stats)这个模块,它会每60秒钟publish消息,把Ets表mqtt_stats的信息发出来。
源码参见-module(emqttd_metrics)这个模块,它的原理同上。
connected to 172.16.6.161:1883 subscribed $SYS/# message recevied from $SYS/brokers: qos=0 emqttd@172.16.6.161 message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0 Erlang MQTT Broker message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0 1.1.3 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 29 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:01 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 30 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:02 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 31 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:03 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 32 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:04 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 33 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:05 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 34 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:06 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 35 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:07 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 36 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:08 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 37 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:09 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 38 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:10 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 39 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:11 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 40 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:12 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 41 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:13 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 42 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:14 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 43 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:15 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 44 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:16 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 45 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:17 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 46 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:18 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 47 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:19 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 48 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:20 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 49 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:21 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 50 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:22 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 51 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:23 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 52 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:24 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 53 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:25 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 54 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:26 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 55 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:27 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 56 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:28 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 57 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:29 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 58 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:30 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 59 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:31 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0 69 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 0 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:32 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0 4249 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0 2 message recevied from $SYS/brokers: qos=0 emqttd@172.16.6.161 message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0 1.1.3 message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0 Erlang MQTT Broker message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 1 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:33 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 2 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:34 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 3 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:35 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 4 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:36 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 5 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:37 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 6 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:38 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 7 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:39 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 8 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:40 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 9 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:41 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 10 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:42 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 11 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:43 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 12 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:44 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 13 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:45 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 14 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:46 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 15 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:47 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 16 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:48 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 17 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:49 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 18 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:50 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 19 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:51 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 20 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:52 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 21 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:53 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 22 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:54 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 23 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:55 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 24 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:56 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 25 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:57 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 26 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:58 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 27 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:24:59 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 28 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:00 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 29 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:01 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 30 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:02 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 31 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:03 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 32 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:04 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 33 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:05 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 34 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:06 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 35 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:07 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 36 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:08 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 37 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:09 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 38 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:10 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 39 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:11 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 40 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:12 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 41 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:13 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 42 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:14 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 43 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:15 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 44 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:16 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 45 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:17 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 46 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:18 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 47 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:19 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 48 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:20 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 49 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:21 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 50 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:22 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 51 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:23 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 52 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:24 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 53 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:25 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 54 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:26 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 55 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:27 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 56 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:28 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 57 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:29 message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected: qos=0 {"clientid":"861694030142478","username":"invtGTerm","ipaddress":"172.16.6.155","session":false,"protocol":3,"connack":0,"ts":1512617129} message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 58 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:30 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 1 minutes, 59 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:31 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0 125 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 0 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:32 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0 15200 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0 3 message recevied from $SYS/brokers: qos=0 emqttd@172.16.6.161 message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0 1.1.3 message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0 Erlang MQTT Broker message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 1 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:33 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 2 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:34 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 3 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:35 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 4 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:36 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 5 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:37 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 6 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:38 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 7 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:39 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 8 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:40 message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected: qos=0 {"clientid":"861694030142478","reason":"normal","ts":1512617141} message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 9 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:41 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 10 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:42 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 11 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:43 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 12 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:44 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 13 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:45 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 14 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:46 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 15 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:47 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 16 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:48 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 17 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:49 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 18 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:50 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 19 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:51 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 20 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:52 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 21 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:53 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 22 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:54 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 23 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:55 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 24 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:56 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 25 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:57 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 26 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:58 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 27 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:25:59 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 28 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:00 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 29 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:01 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 30 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:02 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 31 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:03 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 32 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:04 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 33 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:05 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 34 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:06 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 35 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:07 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 36 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:08 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 37 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:09 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 38 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:10 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 39 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:11 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 40 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:12 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 41 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:13 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 42 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:14 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 43 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:15 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 44 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:16 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 45 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:17 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 46 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:18 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 47 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:19 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 48 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:20 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 49 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:21 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 50 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:22 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 51 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:23 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 52 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:24 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 53 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:25 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 54 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:26 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 55 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:27 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 56 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:28 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 57 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:29 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 58 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:30 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 2 minutes, 59 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:31 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/count: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscriptions/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/topics/max: qos=0 53 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/count: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/count: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/retained/max: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/sessions/max: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/routes/max: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/clients/max: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/stats/subscribers/count: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/received: qos=0 127 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos1/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/sent: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingresp: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 0 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:32 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/disconnect: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/bytes/sent: qos=0 26419 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/retained: qos=0 3 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubcomp/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/dropped: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/received: qos=0 4 message recevied from $SYS/brokers: qos=0 emqttd@172.16.6.161 message recevied from $SYS/brokers/emqttd@172.16.6.161/version: qos=0 1.1.3 message recevied from $SYS/brokers/emqttd@172.16.6.161/sysdescr: qos=0 Erlang MQTT Broker message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/publish/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pingreq: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/subscribe: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/suback: qos=0 1 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrel/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connect: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/connack: qos=0 2 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsubscribe: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos2/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/pubrec/sent: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/unsuback: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/messages/qos0/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/metrics/packets/puback/received: qos=0 0 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 1 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:33 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 2 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:34 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 3 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:35 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 4 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:36 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 5 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:37 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 6 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:38 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 7 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:39 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 8 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:40 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 9 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:41 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 10 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:42 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 11 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:43 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 12 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:44 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 13 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:45 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 14 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:46 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 15 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:47 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 16 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:48 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 17 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:49 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 18 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:50 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 19 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:51 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 20 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:52 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 21 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:53 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 22 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:54 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 23 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:55 message recevied from $SYS/brokers/emqttd@172.16.6.161/uptime: qos=0 3 minutes, 24 seconds message recevied from $SYS/brokers/emqttd@172.16.6.161/datetime: qos=0 2017-12-07 11:26:56 unsubscribed $SYS/#
3、订阅客户端上下线的主题,源码参见-module(emqttd_mod_presence).
源码提及的具体某个节点的某个clientId方式的主题是:
$SYS/brokers/ (node)/clients/ (clientId)/connected
$SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected
$SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected
本人整理之后,通配方式的主题是:
$SYS/brokers/+/clients/+/connected
$SYS/brokers/+/clients/+/disconnected
$SYS/brokers/+/clients/#
实测订阅客户端上下线消息如下:
connected to 172.16.6.161:1883 subscribed $SYS/brokers/+/clients/# message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/connected: qos=0 {"clientid":"861694030142478","username":"invtGTerm","ipaddress":"172.16.6.155","session":false,"protocol":3,"connack":0,"ts":1512629239} message recevied from $SYS/brokers/emqttd@172.16.6.161/clients/861694030142478/disconnected: qos=0 {"clientid":"861694030142478","reason":"normal","ts":1512629242}
所以,出于安全起见,我们把acl.config文件修改为:
允许客户端订阅"$SYS/brokers/+/clients/#"主题,但是禁止订阅"$SYS/#"主题。
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}. {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}. {allow, all, subscribe, ["$SYS/brokers/+/clients/#"]}. {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}. {allow, all}.