Shawn
d1de262f31
fix: inc 'actions.failed' if bridge query failed
2022-08-15 17:21:14 +08:00
Zhongwen Deng
56417a3130
feat: list rules support for pagination and fuzzy filtering
2022-07-25 09:36:08 +08:00
Shawn
b55048f705
chore: update app versions
2022-07-08 16:29:07 +08:00
Shawn
4da106882c
fix(rule): create_at lost when save to config files
2022-07-08 09:17:23 +08:00
Shawn
f132b6f6ae
fix: format the outputs for rule engine CLIs
2022-06-17 18:09:22 +08:00
Shawn
6685a3c5a8
fix: remove the 'headers' field from the rule events
2022-06-17 15:57:10 +08:00
Xinyu Liu
3b00b16abe
Merge pull request #8221 from terry-xiaoyu/fix_delayed_module_disbled_after_emqx_stop
...
feat: fix the hook priorities
2022-06-16 09:42:42 +08:00
Zaiming (Stone) Shi
738a551550
refactor: best-effort json for hocon validation errors
2022-06-15 15:01:15 +02:00
Shawn
39b1b20506
feat: fix the hook priorities
2022-06-15 19:03:40 +08:00
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
Thales Macedo Garitezi
1aea6b3ea7
Merge pull request #7522 from thalesmg/telemetry-revamp-part5
...
feat: add basic rule engine and bridge usage info to telemetry
2022-04-07 10:19:55 -03:00
Thales Macedo Garitezi
8354095e4b
feat(rules): export basic usage info for telemetry
2022-04-06 10:20:23 -03:00
EMQ-YangM
a31891e8e6
feat: enhanced rule engine error handling when json parsing error
2022-04-06 09:56:55 +08:00
Thales Macedo Garitezi
ed7035ec41
style(bridge): please elvis checks
2022-04-05 15:59:50 -03:00
ieQu1
99b3f2f83e
docs(schema): Document missing records and fields
2022-04-04 23:58:43 +02:00
ieQu1
d23a88d0a9
docs(schema): Minor improvements to spelling and formatting.
2022-03-30 13:05:56 +02:00
ieQu1
ce450b7da7
docs(schema): Document the records
2022-03-30 11:53:53 +02:00
EMQ-YangM
3b43cca5bf
fix: use masp:get/3 to avoid crash after match failure
2022-03-29 18:51:10 +08:00
EMQ-YangM
ccc134d061
fix(emqx_rule_api_schema): add rule events schema
2022-03-29 14:03:15 +08:00
EMQ-YangM
4791c64b73
feat: add rule event 'client.check_authz_complete'
2022-03-29 11:24:36 +08:00
EMQ-YangM
65164fb046
feat: add rule event 'client.connack'
2022-03-28 11:32:07 +08:00
JianBo He
83e16a5bc5
Merge pull request #7343 from HJianBo/fix-gw-bugs
2022-03-22 17:49:02 +08:00
EMQ-YangM
6cff53ad67
fix(rule): replace sql crlf with spaces
...
get around the hocon bug: error handling escape character \n
2022-03-21 19:26:06 +08:00
JianBo He
6da4592bb0
chore: fix elivs warnings
2022-03-21 18:52:41 +08:00
JianBo He
5682dcb72e
fix(gw): enrich conninfo for coap&lwm2m
2022-03-21 18:17:24 +08:00
JianBo He
edb1460b56
chore(rule-engine): more safe generate even_msg content
2022-03-21 18:17:24 +08:00
Shawn
50ee6ad2e2
fix(rule): update rules without reset the metrics
2022-03-21 15:06:34 +08:00
Shawn
a892ff9006
fix(dialyzer): update the specs for the rule()
2022-03-16 10:13:16 +08:00
Shawn
93c5fa60b4
fix(rules): store rule configs to cluster config files
2022-03-16 00:39:01 +08:00
Shawn
869dc1a081
fix(rules): ensure create_at unchanged after rule is updated
2022-03-16 00:38:42 +08:00
Shawn
0b4b3a7cf0
fix(dialyzer): some bad type specs
2022-03-11 18:33:08 +08:00
Shawn
590fa1b375
fix(rule): check request body for /rule_test crashes
2022-03-11 18:13:12 +08:00
Shawn
f924b9389d
fix(rule): add swagger schema for events from bridge sources
2022-03-11 14:13:14 +08:00
Shawn
5ca0d4f856
fix(rule): rename the eventname of bridge sources to $bridges/mqtt:*
2022-03-10 23:03:35 +08:00
Shawn
3ca3470844
fix(rule_events): add descs for test columns
2022-03-10 22:49:29 +08:00
Shawn
c673e55a47
fix(rule): add SQL test examples for user properties
...
Porting from v4.4
2022-03-10 16:01:30 +08:00
Shawn
247b14c95f
fix(mqtt_bridge): refine the message format from a mqtt bridge source
2022-03-10 15:57:33 +08:00
Zhongwen Deng
db584f79d6
feat: upgrade hocon to 0.25.0 to replace nullable with required.
2022-02-24 22:39:03 +08:00
Zhongwen Deng
574bbafc9b
fix(schema): Ensure enum is atom or int.
2022-02-24 15:36:04 +08:00
Zaiming (Stone) Shi
1be3eb1446
chore: rename EMQX Broker to just EMQX
2022-02-19 12:51:34 +01:00
k32
5638bcb92b
docs: Fix typos
2022-02-17 23:22:31 +01:00
Zaiming (Stone) Shi
0528262705
chore(app.src): EMQ X -> EMQX in .app.src files
2022-02-16 17:51:45 +01:00
Zaiming (Stone) Shi
b3d9605722
chore(conf): EMQ X -> EMQX in conf files
2022-02-16 17:50:41 +01:00
Zaiming (Stone) Shi
667d66eb1e
docs(README): EMQ X -> EMQX
2022-02-15 16:19:26 +01:00
zhongwencool
f5415589e9
chore(schema): use emqx_schema:qos() instead of union integer.
2022-02-11 10:09:59 +08:00
Shawn
e6997dc1ce
Merge pull request #6942 from terry-xiaoyu/hook_delivery_drop
...
Hook delivery drop
2022-02-09 18:28:56 +08:00
Shawn
b69dca4f08
feat(rule): add testcase for '/delivery_dropped'
2022-02-08 20:37:40 +08:00
Shawn
b2f027bcf7
feat(rule): add 'delivery.dropped' hook for rules
2022-02-08 10:32:25 +08:00
Shawn
261e9929b6
fix(rule): deny POST empty rule ids
2022-02-08 09:57:44 +08:00
Zaiming (Stone) Shi
f7703c906e
refactor: move plain_check impl to emqx_hocon
2022-01-29 10:16:55 +01:00
k32
052bd9081d
docs(schema): Fix typos in the schema files
2022-01-27 22:39:19 +01:00
Zaiming (Stone) Shi
d6f7ffec3c
Merge pull request #6881 from zmstone/refactor-upgrade-hocon-0.23.0
...
refactor: upgrade to hocon 0.23.0
2022-01-27 15:48:23 +01:00
Kian-Meng Ang
fc92e4c8bf
docs: fix typos
2022-01-27 12:29:38 +01:00
Zaiming (Stone) Shi
252d7e85d9
refactor: call new hocon apis
2022-01-27 00:23:08 +01:00
Zaiming (Stone) Shi
2105d1f22b
test: call ct helpers to load config
2022-01-25 11:50:18 +01:00
k32
6e3b05d665
refactor(emqx_plugin): Decorate RPCs
2022-01-18 15:25:34 +01:00
Shawn
8cee9a9e47
fix(rule): compare to null variables should return false
2022-01-17 14:17:49 +08:00
JimMoen
82e3565344
chore: major mode file variable for Emacs
2022-01-13 15:53:47 +08:00
Shawn
2a2a00e0ad
fix(rule): remove rules from all nodes in the cluster
2022-01-11 14:44:08 +08:00
Shawn
72d55c8c0d
fix(rules): improve the names of the metrics
2022-01-07 09:35:00 +08:00
Shawn
67a60e1153
refactor(rule): add more metrics for rule and bridges
2022-01-07 09:34:54 +08:00
Zaiming (Stone) Shi
9f7b513a3f
chore: fix copyright update script to include more files
2022-01-06 08:44:35 +01:00
Zaiming (Stone) Shi
63167cea70
chore: update copyright
2022-01-05 20:55:00 +01:00
Zaiming (Stone) Shi
2898fa76e1
Merge remote-tracking branch 'origin/release-5.0-beta.3' into merge-5.0-beta.3-to-master
2022-01-03 11:39:06 +01:00
Shawn
657ecef67b
fix(resource): don't crash on resource stopped
2021-12-31 20:57:34 +08:00
Shawn
e299d8d138
fix(rule): rules not triggered after the ingress mqtt bridge received some msg
2021-12-31 15:47:03 +08:00
Shawn
94a5965560
fix(rule): dead lock when update configs for rules
2021-12-31 00:03:03 +08:00
Shawn
a42ab3d9da
fix(rule): use emqx_conf:update/3 to make changes to all nodes
2021-12-31 00:03:03 +08:00
zhongwencool
4b6bba11eb
feat(trace): struct log for trace
2021-12-29 00:26:54 +08:00
Thales Macedo Garitezi
0020cf592f
Merge remote-tracking branch 'origin/master' into build-with-mix-mkII
2021-12-28 11:28:40 -03:00
zhongwencool
668180388c
feat(trace): replace logger_formatter by emqx_trace_formatter
2021-12-27 14:40:40 +08:00
Thales Macedo Garitezi
34d6dbca61
chore(mix): simplify build by using rebar3 for umbrella apps
...
By treating the apps in the umbrella as dependencies to be managed and
built by rebar3, we can simplify the maintenance of the release, at
the cost of increased build times: using Mix as before, it could track
changed files better than using rebar. But the complexity and
possibility of discrepancies make it using rebar much more compelling.
2021-12-22 09:40:01 -03:00
Shawn
cd4227b851
fix(rules): don't show the module name 'emqx_rule_outputs' in outputs
2021-12-22 10:26:22 +08:00
Shawn
9b4b3d2e8c
fix(rules): make the 'name' field of POST /rules mandatory
2021-12-22 10:26:22 +08:00
Shawn
5f050b149b
fix(rules): the schema for unsubscribe is messing from rule_test API
2021-12-22 10:26:22 +08:00
Thales Macedo Garitezi
917575de5a
chore(mix): minimal elixir mix release build
...
This commit enables a minimal working build of EMQX release using
Mix. However, to properly start the release, several configuration
steps are still missing. A `mix_release.sh` script does a few hacks
to get the release built with Mix to start properly, by first assuming
that `make emqx` has been run prior to the release, ran once to
generate the `app.*.config` files, and then it copies that and some
other files to the expected places.
Also, `emqx_telemetry` hangs the start procedure because it thinks
it's in an official release and tries to make a request. We disable
it temporarily via config just to get a working build for now.
2021-12-21 13:51:22 -03:00
Shawn
a9c9d9d805
fix(rule): rename enabled to enable
2021-12-18 20:28:14 +08:00
Shawn
a44e18e869
fix(bridge): filter out some extra fields from the request body
2021-12-18 19:19:58 +08:00
Shawn
494c08f849
refactor(rule): add name field to request body of POST /rules
2021-12-18 06:34:44 +08:00
Zaiming (Stone) Shi
fcb7c2c70f
docs: change <module> to {module} so markdown render will not crash
...
<module> is treated as an HTML tag
2021-12-12 19:34:29 +01:00
Shawn
affe69afd6
fix(rules): update the test cases for rule APIs
2021-12-07 09:48:47 +08:00
Shawn
416b9f8d7c
refactor(rule): generate swagger from hocon schema for /rules
2021-12-07 09:48:47 +08:00
Shawn
24bded99d5
refactor(metrics): rename speed to rate in emqx_plugin_libs_metrics
2021-12-07 09:47:53 +08:00
Shawn
e07fce791f
feat(connector): add examples to the swagger doc
2021-12-07 09:47:53 +08:00
Zaiming (Stone) Shi
d9a980c7e1
docs: fix config doc, avoid using <text> in doc body
2021-12-06 08:00:42 +01:00
Ilya Averyanov
ea0fa24ce5
chore(ct): remove verbose output during tests
2021-11-25 18:30:50 +03:00
Shawn
4c149f92c1
feat(bridge): support metrics for bridges
2021-11-23 09:36:10 +08:00
Shawn
a0e81226d7
fix(elvis): improve some code format
2021-11-22 19:10:00 +08:00
Shawn
9c93ea0338
feat(connector): add API for /connectors_test
2021-11-22 17:35:33 +08:00
Shawn
7d64013edd
refactor(connector): add connector configs
2021-11-22 17:35:32 +08:00
Zaiming Shi
6edd862dd5
refactor: no more EMQX_ENTERPRISE compile flag
...
The compile flag was introduced in EQM X 4.3 series
where CE and EE code was diverged large enough which made
non-practicle to determin edition at runtime.
such approach made testing quite challenging as we'll have to
build with different compile flags inorder to run per-edition
test cases
In this commit, we try to retrieve edition info from EMQX's
description text, (put to PT for fast access) at runtime
so we can test ALL editions from a super-set edition (EE).
2021-11-20 20:41:06 +01:00
JimMoen
dcc5ae0642
test: API return code section
2021-11-15 16:30:44 +08:00
JimMoen
b3f9220d02
style: make elvis happy
2021-11-15 16:30:44 +08:00
JimMoen
106aa559e0
fix(api): DELETE success wrongly returned code 200
2021-11-15 16:30:44 +08:00
Zaiming Shi
d1abb30818
ci: fix elvis check
2021-11-04 15:27:10 +01:00
Zaiming Shi
56e2a9741f
style: ensure newline at EOF for all files
2021-11-04 14:40:14 +01:00
zhongwencool
d784e63b9f
emqx_conf ( #5939 )
...
* feat(emqx_conf): move conf manager for emqx_machine to emqx_conf
* chore(emqx_conf): change emqx:get_config/2 to emqx_conf:get/2
* fix: common test failed
* fix: badmatch by typo wrong key
* fix(emqx_conf): get the wrong core nodes
* fix(emqx_conf): get core node's tnx_id not latest tnx_id
* fix: add ro_transation when copy conf file
* fix: delete debug info
* fix: change ekka_rlog to mria_rlog
* fix: remove cluster_rpc from emqx_machine.
* fix: don't call ekka:start/0 explicitly
* fix: ekka should be start in emqx_machine
2021-10-21 18:08:51 +08:00
k32
ff48322e0c
chore(mria): ekka_mnesia:running_nodes -> mria:running_nodes
2021-10-18 22:04:05 +02:00
Tobias Lindahl
aa19c2a908
chore: Remove emqx_ct_helpers as dependency
2021-10-15 10:40:57 +02:00
Shawn
2e52ab9712
fix(rules): improve some code for emqx_rule_engine
2021-10-14 15:09:37 +08:00
Shawn
dce57a3f92
fix(rules): add description to the config 'ignore_sys_message'
...
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2021-10-14 15:09:37 +08:00