123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- {
- "data":[
- {
- "rawsql":"SELECT\n reason,\n clientid,\n username,\n peername,\n socketname\nFROM\n \"$events/client_connected\"",
- "on_action_failed":"continue",
- "metrics":[
- {
- "speed_max":0,
- "speed_last5m":0,
- "speed":0,
- "passed":0,
- "node":"emqx@127.0.0.1",
- "no_result":0,
- "matched":0,
- "failed":0,
- "exception":0
- }
- ],
- "id":"rule:012980",
- "for":[
- "$events/client_connected"
- ],
- "enabled":true,
- "description":" 连接",
- "actions":[
- {
- "params":{
- "target_topic":"/sys/client/connected",
- "target_qos":1,
- "payload_tmpl":"{\"reason\":\"${reason}\",\"clientid\":\"${clientid}\",\"username\":\"${username}\",\"peername\":\"${peername}\",\"socketname\":\"${socketname}\"}"
- },
- "name":"republish",
- "metrics":[
- {
- "taken":0,
- "success":0,
- "node":"emqx@127.0.0.1",
- "failed":0
- }
- ],
- "id":"republish_16528854106752092",
- "fallbacks":[
- ]
- }
- ]
- },
- {
- "rawsql":"SELECT\n reason,\n clientid,\n username,\n peername,\n socketname\nFROM\n \"$events/client_disconnected\"",
- "on_action_failed":"continue",
- "metrics":[
- {
- "speed_max":0,
- "speed_last5m":0,
- "speed":0,
- "passed":0,
- "node":"emqx@127.0.0.1",
- "no_result":0,
- "matched":0,
- "failed":0,
- "exception":0
- }
- ],
- "id":"rule:377397",
- "for":[
- "$events/client_disconnected"
- ],
- "enabled":true,
- "description":"断开连接",
- "actions":[
- {
- "params":{
- "target_topic":"/sys/client/disconnected",
- "target_qos":0,
- "payload_tmpl":"{\"reason\":\"${reason}\",\"clientid\":\"${clientid}\",\"username\":\"${username}\",\"peername\":\"${peername}\",\"socketname\":\"${socketname}\"}"
- },
- "name":"republish",
- "metrics":[
- {
- "taken":0,
- "success":0,
- "node":"emqx@127.0.0.1",
- "failed":0
- }
- ],
- "id":"republish_16528854190433372",
- "fallbacks":[
- ]
- }
- ]
- },
- {
- "rawsql":"SELECT\n clientid,\n username,\n topic,\n qos\nFROM\n \"$events/session_subscribed\"",
- "on_action_failed":"continue",
- "metrics":[
- {
- "speed_max":0,
- "speed_last5m":0,
- "speed":0,
- "passed":0,
- "node":"emqx@127.0.0.1",
- "no_result":0,
- "matched":0,
- "failed":0,
- "exception":0
- }
- ],
- "id":"rule:758695",
- "for":[
- "$events/session_subscribed"
- ],
- "enabled":true,
- "description":"子设备注册成功后,订阅topic: /sys/{productKey}/{deviceName}/c/#",
- "actions":[
- {
- "params":{
- "target_topic":"/sys/session/subscribed",
- "target_qos":1,
- "payload_tmpl":"{\"username\":\"${username}\",\"topic\":\"${topic}\",\"qos\":\"${qos}\",\"clientid\":\"${clientid}\"}"
- },
- "name":"republish",
- "metrics":[
- {
- "taken":0,
- "success":0,
- "node":"emqx@127.0.0.1",
- "failed":0
- }
- ],
- "id":"republish_16530236276902029",
- "fallbacks":[
- ]
- }
- ]
- },
- {
- "rawsql":"SELECT\n clientid,\n username,\n topic,\n qos\nFROM\n \"$events/session_unsubscribed\"",
- "on_action_failed":"continue",
- "metrics":[
- {
- "speed_max":0,
- "speed_last5m":0,
- "speed":0,
- "passed":0,
- "node":"emqx@127.0.0.1",
- "no_result":0,
- "matched":0,
- "failed":0,
- "exception":0
- }
- ],
- "id":"rule:514503",
- "for":[
- "$events/session_unsubscribed"
- ],
- "enabled":true,
- "description":"",
- "actions":[
- {
- "params":{
- "target_topic":"/sys/session/unsubscribed",
- "target_qos":0,
- "payload_tmpl":"{\"username\":\"${username}\",\"topic\":\"${topic}\",\"qos\":\"${qos}\",\"clientid\":\"${clientid}\"}"
- },
- "name":"republish",
- "metrics":[
- {
- "taken":0,
- "success":0,
- "node":"emqx@127.0.0.1",
- "failed":0
- }
- ],
- "id":"republish_16530237303922829",
- "fallbacks":[
- ]
- }
- ]
- }
- ],
- "code":0
- }
|