Commit Graph

311 Commits

Author SHA1 Message Date
ieQu1
7817aec0d0 feat(rule_engine): CLI to list rules 2022-06-13 15:16:54 +02:00
Zaiming (Stone) Shi
2065be569e fix(emqx_cluster_rpc): fail fast on stale state
Due to:

* Cluster RPC MFA is not idempotent!
* There is a lack of rollback for callback's side-effects

For instance, when two nodes try to add a cluster-singleton
concurrently, one of them will have to wait for the table lock
then try to catch-up, then try to apply MFA.
The catch-up will have the singleton created, but the initiated
initiated multicall apply will fail causing the commit to rollback,
but not to 'undo' the singleton creation.
Later, the retries will fail indefinitely.
2022-06-12 20:18:48 +02:00
Zhongwen Deng
c7cc2e85b2 fix: add default&example for schema 2022-06-06 09:52:10 +08:00
Zhongwen Deng
9ec804ae03 feat: generate example.conf from schemas 2022-05-31 19:20:27 +08:00
Zhongwen Deng
8aa60cc0a5 feat: generate a minimized emqx.conf 2022-05-31 19:20:27 +08:00
Shawn
eacc7768d2 fix: make 'name' field optional 2022-05-27 18:54:25 +08:00
Zaiming (Stone) Shi
ebe4d7c3fb refactor: stop releasing edge edition
Prior to EMQX 5.0, the edge edition's main difference comaring
to standard edition are:
* Less number of plugins in the release (smaller package size)
* Smaller number is vm.args (for lower memory usage)

Starting from 5.0 most of the plugins are included as features,
the tuned vm.args arguments does not justify a special release edition.

Also as nanomq is getting mature,
EMQ's recommendtation for MQTT broker in edge is https://nanomq.io/
2022-05-26 20:05:46 +02:00
Shawn
55fce33477 fix: add telemetry testcases in all/0 2022-05-25 21:55:28 +08:00
Shawn
a157539710 refactor(rule): rename http_bridge -> webhook 2022-05-25 18:56:12 +08:00
Shawn
71de9616d3 refactor(rule): rename outputs -> actions 2022-05-25 17:02:37 +08:00
Xinyu Liu
866810cea6
Merge pull request #8006 from emqx/copy-of-kjell/jq/timeout
feat(rule_engine): default timeout for jq/2 and jq/3 with timeout
2022-05-23 11:58:40 +08:00
Shawn
7bc2d9edbb fix: remove bison from the required tools when building emqx 2022-05-21 14:17:12 +08:00
Kjell Winblad
efd6461e15 docs: chinese documentation for jq timeout configuration
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-05-21 07:07:29 +02:00
EMQ-YangM
005fce63d1 feat: add rule engine function float2str/2 2022-05-19 16:16:05 +08:00
Xinyu Liu
406bc3502e
Merge pull request #7981 from terry-xiaoyu/improve_bridge_apis
refactor: move some APIs to new module emqx_bridge_resource
2022-05-18 18:31:48 +08:00
Yang Miao
bf552f2c4b
Merge pull request #7980 from EMQ-YangM/fix_zero_padding
fix: zero padding should be to the MSB side
2022-05-18 17:22:23 +08:00
EMQ-YangM
66c62f432b fix: zero padding should be to the MSB side 2022-05-18 15:28:01 +08:00
Shawn
d89d692d3e refactor: move some APIs to new module emqx_bridge_resource 2022-05-18 15:12:34 +08:00
Kjell Winblad
402ab7e759 chore: remove unnecessary repeated code
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-05-18 07:21:16 +02:00
Yang Miao
2b58733571
Merge pull request #7971 from EMQ-YangM/fix_hexstring_to_binary
fix: hexstr_to_bin support half byte
2022-05-18 10:14:25 +08:00
Kjell Winblad
05032467bd feat(rule_engine): default timeout for jq/2 and jq/3 with timeout
This commit adds a default timeout of 10 seconds to the rule engine's
`jq/2` function, and adds a new function `jq/3` (where the last parameter is
a timeout value). The default timeout can be configured with the setting
"rule_engine.jq_function_default_timeout".

Having a timeout when executing jq code in the rule engine is important
as jq code can potentially run forever. Also, the Erlang jq library
limits the number of jq programs that can execute concurrently so a jq
program that loops forever could potentially also prevent a "non-buggy"
jq program from ever starting.
2022-05-17 19:36:32 +02:00
Shawn
c98fd04f8f fix: rename the rule metrics 2022-05-17 17:17:07 +08:00
EMQ-YangM
d8da8f1686 fix: hexstr_to_bin support half byte 2022-05-17 16:47:59 +08:00
JianBo He
d8ec51a0c2 feat(rule-engine): add proto_name/proto_ver for $event/client_disconnected event 2022-05-16 15:12:41 +08:00
DDDHuang
8b0adf69d2
Merge pull request #7926 from DDDHuang/rule_api_errormsg
fix: better error message for rule engine
2022-05-12 19:07:47 +08:00
DDDHuang
5210cd6e8d fix(test): rule engine api SUITE , bad rule name 2022-05-12 18:01:37 +08:00
DDDHuang
2de69c97ba fix: ruleengine & connector & bridge api, better error message 2022-05-12 16:51:36 +08:00
DDDHuang
a284ab9cf8 fix: better error message for rule engine 2022-05-12 11:06:07 +08:00
Thales Macedo Garitezi
47ed9cbc76
fix(telemetry): count bridges referenced in from rule clauses 2022-05-11 15:15:17 -03:00
Shawn
82da4d82be chore: update jq to v0.2.0 2022-05-06 22:20:35 +08:00
EMQ-YangM
685b06eeed fix: avoid 'rule_test' api crash 2022-05-05 17:28:59 +08:00
Kjell Winblad
74c33cd4e5 feat(rule_engine): add jq function to the rule engine
This commit adds a function to the rule engine that alows users
to transform text or JSON objects using [jq filter programs][1].

[jq][1] is a command line tool that can be used to transform
and filter JSON text using jq's built-in language. The rule engine
function that is added with this commit uses the
[Erlang jq NIF library][2] that wraps the jq C library in an
Erlang NIF function.

[1]: https://stedolan.github.io/jq/
[2]: https://github.com/emqx/jq
2022-05-04 17:09:16 +02:00
Zaiming (Stone) Shi
6b44d96c0d refactor: rename functions to please elvis 2022-04-29 10:52:08 +02:00
Zaiming (Stone) Shi
4e65322667 refactor: move emqx_plugin_libs_metrics to emqx app
because it can not depend on other apps
2022-04-29 12:41:36 +08:00
Zaiming (Stone) Shi
02c3f87b31 style: reformat all remaining apps 2022-04-27 15:51:18 +02:00
Xinyu Liu
46e993fa81
Merge pull request #7786 from terry-xiaoyu/save_tls_files_for_bridges
Save tls files for bridges
2022-04-27 21:48:18 +08:00
Shawn
ba800d853d fix(rule): republish all available fields if payload template empty 2022-04-27 11:59:15 +08:00
EMQ-YangM
1fac70d2bb fix: remove error field 2022-04-27 09:48:57 +08:00
JianBo He
a58b88aeec chore(i18n): fix more and more typos 2022-04-26 09:28:05 +08:00
JimMoen
e9843aa225 fix(doc): html line break use </br> 2022-04-24 18:56:21 +08:00
EMQ-YangM
cef16ac382 fix: improve document quality 2022-04-21 15:05:56 +08:00
EMQ-YangM
51972af472 feat: add chinese to rule engine description 2022-04-20 10:23:56 +08:00
Xinyu Liu
21fe7f01ee
Merge pull request #7624 from DDDHuang/fix_api_params
Fix api params
2022-04-18 09:33:22 +08:00
DDDHuang
ea6b3c7b51 fix: format code 2022-04-16 16:37:10 +08:00
DDDHuang
82ce6ae9f9 fix: bad integer, bad qos; TODO: gateway api * 2 2022-04-16 16:37:10 +08:00
EMQ-YangM
e4b62f3a5f feat: add rule-engine functions 2022-04-15 18:02:24 +08:00
EMQ-YangM
ee6ac90d47 fix: behavior of rule-engine when selection field does not exist 2022-04-13 18:19:42 +08:00
EMQ-YangM
21dfd5dd47 fix: export rule reset_metrics api 2022-04-11 15:21:14 +08:00
EMQ-YangM
f91c0e140d fix: fix static_checks error 2022-04-11 10:25:48 +08:00
EMQ-YangM
fa0c4d17ee feat: impl rule_engine reset_metrics api 2022-04-11 10:25:48 +08:00