Skip to content

Instantly share code, notes, and snippets.

@frenchbread
Forked from phanimahesh/emqttd-setup.md
Last active March 24, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frenchbread/f1b0b0b6788e95492132f77f4661f751 to your computer and use it in GitHub Desktop.
Save frenchbread/f1b0b0b6788e95492132f77f4661f751 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 the 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 file

    • Add following to release tuple:
      {emq_plugin_elasticsearch, load},
      htstream
      
  • 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. Use just client_id and username for now.

  • 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