Skip to content

Instantly share code, notes, and snippets.

@phanimahesh
Last active March 24, 2017 17:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phanimahesh/4089fe1ca0db7aa7193146cc822d3a49 to your computer and use it in GitHub Desktop.
Save phanimahesh/4089fe1ca0db7aa7193146cc822d3a49 to your computer and use it in GitHub Desktop.
Instructions to set up emqttd

Instructions to set up emqttd

  • Clone the repo github.com/emqtt/emq-relx

  • Edit Makefile:

    • Add emq_plugin_elasticsearch to DEPS
    • Add a line dep_emq_plugin_elasticsearch = git https://github.com/phanimahesh/emq_plugin_elasticsearch preview
  • Edit relx.config

    • Add {emq_plugin_elasticsearch, load} to release emqttd's list of applications.
  • make

  • Copy the folder _rel/emqttd where needed. This is a self contained release.

  • Review files under etc and verify the settings. In particular, check etc/plugins/emq_plugin_elasticsearch.conf Update the url to ES, and fields to be logged to ES. Keep only the ones strictly needed. As of writing, apinf dashboard only needs topic and topics in relevant events.

  • Run bin/emqttd start. Check bin/emqttd ping (should respond pong) and bin/emqttd_ctl plugins list.

  • If ES plugin is not active, run bin/emqttd_ctl plugins load emq_plugin_elasticsearch

To verify if emqttd is working properly:

  • Install a mqtt client. Example: mosquitto_pub and mosquitto_sub, bundled with mosquitto
  • Subscribe to a topic and publish messages to it, verify they are received.
  • Verify that ES instance configured received events corresponding to the messsage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment