# emq-web-hook **Repository Path**: chuckchill/emq-web-hook ## Basic Information - **Project Name**: emq-web-hook - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-07-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README emq-web-hook ============ EMQ broker plugin to catch broker hooks through webhook.
[http://emqtt.io](http://emqtt.io)
[https://www.sakib.ninja](https://www.sakib.ninja) Setup ----- ##### In Makefile, DEPS += emq_web_hook dep_emq_web_hook = git https://github.com/emqtt/emq-web-hook master ##### In relx.config {emq_webhook_plugin, load} ##### emq_web_hook.conf ``` web.hook.api.url = http://127.0.0.1 web.hook.rule.client.connected.1 = {"action": "on_client_connected"} web.hook.rule.client.disconnected.1 = {"action": "on_client_disconnected"} web.hook.rule.client.subscribe.1 = {"action": "on_client_subscribe"} web.hook.rule.client.unsubscribe.1 = {"action": "on_client_unsubscribe"} web.hook.rule.session.created.1 = {"action": "on_session_created"} web.hook.rule.session.subscribed.1 = {"action": "on_session_subscribed"} web.hook.rule.session.unsubscribed.1 = {"action": "on_session_unsubscribed"} web.hook.rule.session.terminated.1 = {"action": "on_session_terminated"} web.hook.rule.message.publish.1 = {"action": "on_message_publish"} web.hook.rule.message.delivered.1 = {"action": "on_message_delivered"} web.hook.rule.message.acked.1 = {"action": "on_message_acked"} ``` API ---- * client.connected ```json { "action":"client_connected", "client_id":"C_1492410235117", "username":"C_1492410235117", "conn_ack":0 } ``` * client.disconnected ```json { "action":"client_disconnected", "client_id":"C_1492410235117", "username":"C_1492410235117", "reason":"normal" } ``` * client.subscribe ```json { "action":"client_subscribe", "client_id":"C_1492410235117", "username":"C_1492410235117", "topic":"world", "opts":{ "qos":0 } } ``` * client.unsubscribe ```json { "action":"client_unsubscribe", "client_id":"C_1492410235117", "username":"C_1492410235117", "topic":"world" } ``` * session.created ```json { "action":"session_created", "client_id":"C_1492410235117", "username":"C_1492410235117" } ``` * session.subscribed ```json { "action":"session_subscribed", "client_id":"C_1492410235117", "username":"C_1492410235117", "topic":"world", "opts":{ "qos":0 } } ``` * session.unsubscribed ```json { "action":"session_unsubscribed", "client_id":"C_1492410235117", "username":"C_1492410235117", "topic":"world" } ``` * session.terminated ```json { "action":"session_terminated", "client_id":"C_1492410235117", "username":"C_1492410235117", "reason":"normal" } ``` * message.publish ```json { "action":"message_publish", "from_client_id":"C_1492410235117", "from_username":"C_1492410235117", "topic":"world", "qos":0, "retain":true, "payload":"Hello world!", "ts":1492412774 } ``` * message.delivered ```json { "action":"message_delivered", "client_id":"C_1492410235117", "username":"C_1492410235117", "from_client_id":"C_1492410235117", "from_username":"C_1492410235117", "topic":"world", "qos":0, "retain":true, "payload":"Hello world!", "ts":1492412826 } ``` * message.acked ```json { "action":"message_acked", "client_id":"C_1492410235117", "username":"C_1492410235117", "from_client_id":"C_1492410235117", "from_username":"C_1492410235117", "topic":"world", "qos":1, "retain":true, "payload":"Hello world!", "ts":1492412914 } ``` License ------- Apache License Version 2.0 Author ------ * [Sakib Sami](https://github.com/s4kibs4mi) Contributors ------ * [turtleDeng](https://github.com/turtleDeng) * [vishr](https://github.com/vishr) * [emqplus](https://github.com/emqplus) * [huangdan](https://github.com/huangdan)