emqx / emqx-rule-engine

EMQX Rule Engine
https://www.emqx.com
Apache License 2.0
70 stars 30 forks source link

Config with Rules #139

Closed alexandrim0 closed 4 years ago

alexandrim0 commented 4 years ago

Hello!

Are you planning to implement configuring Rule Engine by config file? It would be great to have that ability making broker`s restart less pain.

Thank you!

HJianBo commented 4 years ago

In general, there is no need to restart the server after adding or removing rules. It works in real-time.

terry-xiaoyu commented 4 years ago

@alexandrim0 Rule engine saves the rules/actions to mnesia tables, and the db files would be in the data directory of the emqx's installation path. If you keep these files unchanged after restarting emqx, all the rules and actions will be reloaded.

I am considering adding the ability that export all the rules/action to a file and then import them back using CLI. This way we could keep the rules even after software upgrade.

alexandrim0 commented 4 years ago

Yes, I mean that case when I start a new container or add node in a cluster or just restart container with --force-recreate. So, now adding rules to EMQX running inside of docker container by CLI like a challenge because of need to special chracters escaping (docker CLI, bash itself, etc.). Export\import of rules will make me happy, especially if text format will be used.

Thank you!

kozelok commented 4 years ago

+1 for this one. If running emqx in Kubernetes, it is difficult to configure rules. Doing it form Configfile(ConfigMap) would be much easier.

terry-xiaoyu commented 4 years ago

Rules/Resources can now be exported/imported from dashboard, after emqx 4.1.0.

matthewGEA commented 3 years ago

@terry-xiaoyu Can you explain where the export/import feature is in the dashboard? I am running 4.3-rc.3 and cannot find it.