-
Clone the repo github.com/emqtt/emq-relx
-
Edit the
Makefile:- Add
emq_plugin_elasticsearchtoDEPS - Add a line
dep_emq_plugin_elasticsearch = git https://github.com/phanimahesh/emq_plugin_elasticsearch preview
- Add
-
Edit
relx.configfile- Add following to release tuple:
{emq_plugin_elasticsearch, load}, htstream
- Add following to release tuple:
-
make -
Copy the folder
_rel/emqttdwhere needed. This is a self contained release. -
Review files under
etcand verify the settings. In particular, checketc/plugins/emq_plugin_elasticsearch.confUpdate the url to ES, and fields to be logged to ES. Use just client_id and username for now. -
Run
bin/emqttd start. Checkbin/emqttd ping(should respondpong) andbin/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.