Commit Graph

1049 Commits

Author SHA1 Message Date
Zhongwen Deng 45254c5936 chore: add changelog for create trace 2023-04-12 17:59:14 +08:00
Zhongwen Deng f161399bcc feat: deprecated trace config 2023-04-12 17:07:45 +08:00
JimMoen ab807fba51
Merge pull request #10329 from kjellwinblad/kjell/EMQX-9138-e-5-0-2-ensure-that-the-error-messages-returned-are-consistent
fix: create consistent interface 'with_node' for API access
2023-04-06 14:47:42 +08:00
Stefan Strigler a39312e892
Merge pull request #10292 from sstrigler/EMQX-9253-readme-refine-emqx-management
EMQX Management README
2023-04-05 09:00:34 +02:00
Ivan Dyachkov 9d1a16aae1 feat: add emqx_rpc:multicall_on_running
also move emqx:is_running multicall to emqx_proto_v2:are_running
2023-04-04 20:40:47 +02:00
Ivan Dyachkov 3d7ceb01a0 fix(mgmt): fix stats api by applying filter to running_nodes 2023-04-04 19:58:43 +02:00
Stefan Strigler 04626ce9cc fix: create consistent interface 'with_node' for API access 2023-04-04 16:54:14 +02:00
Zaiming (Stone) Shi 36000abf51 refactor: relocate i18n files for apps/emqx 2023-04-03 13:12:24 +02:00
Stefan Strigler 7e31e60e90
style: fix wording 2023-03-31 09:19:48 +02:00
Stefan Strigler 1ff96f5314
style: fix wording
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2023-03-31 09:18:39 +02:00
Thales Macedo Garitezi a2b82dae69 fix(plugins): create directory before uploading
Fixes https://emqx.atlassian.net/browse/EMQX-9434

Fixes https://github.com/emqx/emqx-elixir-plugin/issues/23
2023-03-30 17:51:16 -03:00
Stefan Strigler 7c597bfaa9 docs: give a better idea of what this application is supposed to do 2023-03-30 16:57:16 +02:00
Thales Macedo Garitezi ad28d8418d
Merge pull request #10274 from thalesmg/fix-subs-api-egress-mqtt-v50
fix: handle subscription list api when there are `emqx:subscribe` internal subscriptions
2023-03-30 11:16:31 -03:00
firest f794666c7f fix(i18n): fix the description error about the default value of `until` 2023-03-30 17:12:45 +08:00
Thales Macedo Garitezi 916ce99fd5 fix: handle subscription list api when there are `emqx:subscribe` subscriptions 2023-03-29 14:56:40 -03:00
Stefan Strigler 193905c7b9
Merge pull request #10237 from sstrigler/EMQX-9138-e-5-0-2-ensure-that-the-error-messages-returned-are-consistent
fix: create consistent interface 'with_node' for API access
2023-03-28 10:41:10 +02:00
Stefan Strigler 64a1d84a44 fix: create consistent interface 'with_node' for API access 2023-03-27 12:14:48 +02:00
Zaiming (Stone) Shi dd996ad1dc chore: bump app vsns 2023-03-24 21:47:15 +01:00
Serge Tupchii b02d0088ea fix(emqx_management): resolve plugin name clashes
Allow installing a plugin if its name matches the beginning of another (already installed) plugin name.
For example: if plugin "emqx_plugin_template_a" is installed, it must not block installing plugin "emqx_plugin_template".

Closes: #10213, EMQX-9290
2023-03-24 16:11:31 +02:00
Stefan Strigler 678400bc0a fix: add summary to schemas where description has html 2023-03-23 16:40:43 +01:00
Thales Macedo Garitezi 91a57faa95
Merge pull request #10128 from thalesmg/ocsp-v50-mkII
feat: add ocsp stapling support to mqtt ssl listener (5.0)
2023-03-16 13:10:48 -03:00
Zhongwen Deng 60677bc400 chore: remove unuse code 2023-03-15 20:40:54 +08:00
Thales Macedo Garitezi 52263a0448 feat: add ocsp stapling and crl support to mqtt ssl listener 2023-03-14 16:08:47 -03:00
Serge Tupchii bde4215a11 fix: copy plugins to a new node joining a cluster
Closes: EMQX-8889
2023-03-14 20:42:57 +02:00
ieQu1 e3595f2e79 chore(mria): Bump version to 0.4.0 2023-03-11 00:37:25 +01:00
Zaiming (Stone) Shi 469071df00 fix(emqx_management): ensure binary string for log_path 2023-03-01 07:45:36 +01:00
Zaiming (Stone) Shi d369e3167b fix(emqx_mgmt): format stoped nodes correctly 2023-02-28 21:38:30 +01:00
Stefan Strigler 0cfa5e2ce1
Merge pull request #9994 from sstrigler/EMQX-3688-emqx-mgmt
emqx mgmt code coverage and cleanup
2023-02-22 14:30:36 +01:00
Stefan Strigler 28382ec26b test: add test for pubsub api 2023-02-21 13:11:34 +01:00
Stefan Strigler e78c2c2869 fix: return 404 in case node is not found 2023-02-21 10:20:34 +01:00
Stefan Strigler 9ecf154a71 fix: limit bytes param to signed 32bit int
We still need to check if chunk we're reading fits in memory
2023-02-21 10:20:14 +01:00
Stefan Strigler 8ae4440061 style: fix API description for bytes parameter 2023-02-21 09:41:32 +01:00
Stefan Strigler 81fad58f12 fix: re-add `list_subscriptions/0`
Created a ticket to add an actual working implementation
2023-02-21 09:41:00 +01:00
Stefan Strigler 71f3efb2ce style: fix empty line 2023-02-21 09:41:00 +01:00
Stefan Strigler c44c7fcbce style: remove unused macro 2023-02-21 09:41:00 +01:00
Stefan Strigler 0482f43802 test: add test for banned and alarms 2023-02-21 09:41:00 +01:00
Stefan Strigler 0d357f7038 refactor: cleanup list subscriptions 2023-02-21 09:41:00 +01:00
Stefan Strigler 0d2ce85776 fix: return 'not found' for subscriptions of unknown client 2023-02-21 09:41:00 +01:00
Stefan Strigler f3ced5d5eb refactor: kickout_client doesn't need a format fun 2023-02-21 09:41:00 +01:00
Stefan Strigler a6d88c3caa test: more tests 2023-02-21 09:41:00 +01:00
Stefan Strigler fc33bce40d test(emqx_mgmt): test list_nodes/0 2023-02-21 09:41:00 +01:00
Stefan Strigler 777ca72ad5 fix: don't crash on broker_info() 2023-02-21 09:41:00 +01:00
Stefan Strigler f9895a33b6 refactor: rename max_row_limit to default_row_limit 2023-02-21 09:41:00 +01:00
ieQu1 794bedef9f fix(emqx_ctl): Start CLI before ekka 2023-02-17 09:50:50 +01:00
Zaiming (Stone) Shi 719e02cc96 fix(metrics): use the same data source for RAM usage info 2023-02-15 16:11:39 +01:00
Stefan Strigler 293df88f36
Merge pull request #9965 from sstrigler/EMQX-3689-emqx-mgmt-api
EMQX 3689 emqx mgmt api
2023-02-15 15:13:17 +01:00
Stefan Strigler 921b5b2c5c style: rename function for compliance 2023-02-15 13:38:14 +01:00
Stefan Strigler 21b8ff6d14 test: use unit test to test paginate 2023-02-15 13:31:48 +01:00
Stefan Strigler 9be73bfff0 fix: support ipv6 at ip_port 2023-02-15 10:37:13 +01:00
Stefan Strigler 4417ea9db7 style: missing comma 2023-02-14 09:13:45 +01:00
JianBo He 0d63cfdc97 chore: remove changes to 5.0.18 2023-02-14 15:34:12 +08:00
JianBo He 36b1c3eb5b fix(api): fix bad return error message if client id is not found 2023-02-14 15:30:55 +08:00
Stefan Strigler 8b47acd58d test: page overflow and bad rpc in cluster 2023-02-13 17:46:26 +01:00
Stefan Strigler 8d34a72ab6 test: add test for clustered badrpc 2023-02-13 17:14:15 +01:00
Stefan Strigler a28588ebf0 fix: bad spec 2023-02-13 17:14:02 +01:00
Stefan Strigler 89630a8a74 test: query bad node 2023-02-13 16:09:04 +01:00
Stefan Strigler 0c87d238e9 chore: bump version 2023-02-13 15:46:27 +01:00
Stefan Strigler 9e954585ae test: add node query tests and some more 2023-02-13 15:45:37 +01:00
Stefan Strigler 0e9289e48c refactor: remove unused clause 2023-02-13 15:45:37 +01:00
Stefan Strigler 743ced17c9 test: add test for more types in schema 2023-02-13 15:45:37 +01:00
Stefan Strigler 28560e4603 refactor: remove unused code 2023-02-13 15:45:37 +01:00
Zaiming (Stone) Shi 157c919ba1 ci: add i18n style check script 2023-02-09 11:41:52 +01:00
Stefan Strigler 758d19f1e0 chore: bump vsn 2023-02-06 10:44:06 +01:00
Stefan Strigler 847f899fa0 test: ensure bad plugin upload gets deleted 2023-02-06 09:46:16 +01:00
Stefan Strigler e135f8654c test: enable basic plugins API tests 2023-02-06 09:46:16 +01:00
Stefan Strigler 70c4e12b68 fix: cleanup after upload of broken plugin 2023-02-06 09:46:16 +01:00
Zaiming (Stone) Shi 3d6756cbe8 test: fix addrinuse errors in listeners API test SUITE 2023-02-02 16:37:56 +01:00
Zaiming (Stone) Shi 7ea140599a
Merge pull request #9894 from id/ci-always-run-static-checks
ci: always run static_checks
2023-02-02 16:33:19 +01:00
Zaiming (Stone) Shi 9a9943d35d chore(emqx_mgmt_cache): ignore unused return value for dialyer 2023-02-02 14:11:12 +01:00
Zaiming (Stone) Shi d5c482b0b0 docs: remove timer unit from description
the user input has time unit. e.g. "5s" for 5 seconds etc.
2023-02-02 13:49:20 +01:00
Zhongwen Deng 6382915036 chore: repalce fresh by refresh 2023-02-01 17:36:30 +08:00
Zhongwen Deng 3c4d09a752 fix: get_memory_cache return {ok, Mem} | stale 2023-02-01 16:00:55 +08:00
Zhongwen Deng 56b9238645 fix: only cache sys_memory in linux 2023-02-01 12:21:34 +08:00
Zhongwen Deng 71f00f2962 test: ctl suite failed 2023-02-01 10:07:22 +08:00
Zhongwen Deng 7a9f477267 feat: use emqx_mgmt_cache to cache sys_memory 2023-02-01 10:07:22 +08:00
Zhongwen Deng c2bdb9faa7 test: multiple_nodes case failed 2023-02-01 10:07:22 +08:00
Zhongwen Deng b6e6315b50 feat: change loads from string to float 2023-02-01 10:07:22 +08:00
Zhongwen Deng 5783127c30 test: cpu_sup:load mock test 2023-02-01 10:07:22 +08:00
Zhongwen Deng 2d67bb3fb6 fix: /api/nodes is timeout if emqx in high load 2023-02-01 10:07:22 +08:00
Erik Timan 5b3a77e3c7 test(emqx_management): fix flaky route handling in get topic test
This reworks a test case to use a second slave node. This ensures that
an added route is permanently in the routing table. The old version
reverted the routing table quickly since the node name given wasn't a
real node.
2023-01-31 08:28:55 +01:00
Erik Timan 03cabf6b26 chore: bump app VSN 2023-01-31 08:27:54 +01:00
Erik Timan 33e011aff5 fix(emqx_management): handle multiple routes in topics/{topic} API
The topics/{topic} API endpoint would return 500 - Internal Error if a
topic had multiple routes. This is now fixed by returning a list of
routes.
2023-01-31 08:27:33 +01:00
Andrew Mayorov 33b3c4fa9a
Merge pull request #9753 from feat/EMQX-8738/convert-ordered-sets
feat: turn tables queried with search APIs into ordered sets
2023-01-18 18:05:57 +04:00
Erik Timan 42182279b7 fix(emqx_management): ensure trace file dir is deleted on zip exception 2023-01-18 10:20:41 +01:00
Erik Timan 30a5cfaa83 fix(emqx_management): remove trace files after zip download
We only deleted the resulting zip after a trace file download, not the
actual trace files. This adds a deletion of the uncompressed trace files
as well. It also creates unique directories when collecting trace files
so that concurrent downloads doesn't overwrite files in transit.
2023-01-17 14:24:10 +01:00
Erik Timan 94296258b4 test(emqx_management): refactor test suite to use common test utils for API calls 2023-01-17 14:24:10 +01:00
Stefan Strigler bc69a00329 test: get plugin template as artifact 2023-01-17 09:50:17 +01:00
Andrew Mayorov 34571c779d
feat: make `suboption` table ordering more natural 2023-01-16 15:39:10 +03:00
Zaiming (Stone) Shi a77d33b97d
Merge pull request #9751 from lafirest/fix/un_cleared_ca
fix that obsoleted cert file will not be deleted after the listener is updated/deleted
2023-01-13 14:38:55 +01:00
Zaiming (Stone) Shi bb3dceb456
Merge pull request #9749 from keynslug/fix/count-respect-matchspec
fix(paging): respect matchspec even if qs is empty when counting
2023-01-13 14:29:03 +01:00
Zaiming (Stone) Shi 2974269f2a
Merge pull request #9723 from emqx/release-50
chore: sync release-50 to master
2023-01-13 14:13:12 +01:00
firest 0a965879dd fix: fix that obsoleted cert file will not be deleted after the listener is updated/deleted 2023-01-13 18:42:27 +08:00
Zhongwen Deng f15b29b1ef chore: upgrade app version 2023-01-13 18:22:29 +08:00
Andrew Mayorov b3e62bd8f8
fix(paging): respect matchspec even if qs is empty when counting 2023-01-13 12:56:29 +03:00
zhongwencool 383a6812d1
Merge pull request #9748 from zhongwencool/listener-max-connections-default-value
fix: default max_connections in raw config should be binary not atom
2023-01-13 17:55:22 +08:00
Zhongwen Deng eacdaffe3c fix: default max_connections in raw config should be binary not atom 2023-01-13 16:01:57 +08:00
Andrew Mayorov 33d88c95de
Merge pull request #9745 from keynslug/fix/EMQX-8702/changelog
chore: add changelog for the fuzzy search API fix
2023-01-13 11:59:37 +04:00
Andrew Mayorov 90e837783f
fix(paging): rename `partial` to `overflow` for clarity 2023-01-12 19:25:40 +03:00
firest c5f557e315 fix: disable basic auth for HTTP API 2023-01-12 21:35:49 +08:00
Andrew Mayorov 50c9321b9e
fix(api): anticipate empty set of nodes handling cluster query 2023-01-12 10:57:50 +03:00
Andrew Mayorov abf6f143e5
fix(paging): return subset of rows if page start is in the middle
This change should cover this example scenario where select ended
returning 4 rows.

Row 3
Row 4
Row 5 <- page start
Row 6

Here, only rows 5 and 6 should end up in the response. Before this
change some rows could be duplicated across adjacent search pages.
2023-01-12 10:57:50 +03:00
Andrew Mayorov e07aa2086b
fix(api): augment paged search responses with `hasnext` flag
This flag indicates whether there are more results available on the
next pages. It is needed in cases when the total number of search
results is not known in advance.

Also, in such cases there's no `count` field in responses anymore
because responding with `0` was confusing for clients: it's not possible
to differentiate between "there are no results" and "we don't know how
much".

Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2023-01-12 10:57:30 +03:00
zhongwencool e7d6d26186
Merge pull request #9713 from zhongwencool/api-keys-bootstrap-file
feat: introduce API keys bootstrap_file config
2023-01-11 11:30:45 +08:00
Zaiming (Stone) Shi 6bbb5edb53
Merge pull request #9667 from olcai/remove-clientid-in-publish-request-body
fix(mgmt_api): remove possibility to set clientid in /publish API
2023-01-10 22:31:35 +01:00
Erik Timan fb97096405 fix(mgmt_api): deprecate clientid field instead of removing it 2023-01-10 16:48:04 +01:00
zhongwencool 918ba0dffd
chore: apply suggestions from code review
Co-authored-by: ieQu1 <99872536+ieQu1@users.noreply.github.com>
2023-01-10 20:39:31 +08:00
Zhongwen Deng 5d4a1933a2 chore: add more test for api_key 2023-01-10 19:04:00 +08:00
Zhongwen Deng f6a47e5cf6 chore: support api_key.bootstrap_file config 2023-01-10 19:03:49 +08:00
Zhongwen Deng 142826c4c3 chore: limit the maximum number of api keys to 100 2023-01-10 19:03:39 +08:00
Shawn 73643e932f fix: bulk subscribe topics failed in the client.connected hook 2023-01-10 16:43:24 +08:00
Xinyu Liu 52343e58c7
Merge pull request #9703 from emqx/subscribe-api-function-clause
fix: missing default value for qos field of API /clients/:clientid/subscribe
2023-01-10 10:13:58 +08:00
Shawn 50717a5567 fix: set the topic field of API /clients/:clientid/subscribe as requried 2023-01-09 17:57:39 +08:00
Erik Timan 3319a8d28e fix(mgmt_api): remove possibility to set clientid in /publish API
To avoid security confusion, we remove the possibility to specify the
client ID in the request body for /publish and /publish/bulk.
2023-01-09 09:30:34 +01:00
Zaiming (Stone) Shi 8d53d154d9 refactor: remove license from configs API
license has its own config APIs
2023-01-09 09:16:19 +01:00
Shawn 7ed1384623 fix: missing default value for qos field of API /clients/:clientid/subscribe 2023-01-09 16:02:10 +08:00
JianBo He 5d55e3a7b3 chore: updage mgmt app vsn 2023-01-06 10:31:27 +08:00
JianBo He 65729cd640 fix(clients): fix expiry_interval unit error
It should be second not millisecond
2023-01-06 10:31:27 +08:00
Zaiming (Stone) Shi dbc10c2eed chore: update copyright year 2023 2023-01-02 09:22:27 +01:00
firest af3f0c9bb0 fix(banned): ensure the default timeout of `banned` is large enough 2022-12-26 10:17:31 +08:00
Andrew Mayorov 41a4e41d0c
fix(ct): prevent testcase flapping
Testcase `t_log_file` was flapping when run happened to pass through
boundary of a second. Archive files' `ctime`s could differ between
consecutive archive downloads.
2022-12-16 13:45:06 +03:00
Zaiming (Stone) Shi 9e3da5b661 chore: bump app versions 2022-12-14 20:07:41 +01:00
Zaiming (Stone) Shi 42c58e2a91 Merge remote-tracking branch 'origin/release-50' into 1214-sync-master-upstreams 2022-12-14 15:29:13 +01:00
Erik Timan 0242d5f360 test: rename return_body to return_all in emqx_mgmt api test util 2022-12-12 13:29:11 +01:00
Erik Timan 8009f0a3a8 test: api returns for lwm2m client posts
Add test coverage for HTTP 204 returns from lwm2m client API
posts. This includes a small refactoring of the request functionality
in emqx_mgmt_api_test_util.
2022-12-12 13:28:24 +01:00
Stefan Strigler 6b22a074f0 refactor: move `/mqtt/sys_topics` to generic `/configs/sys_topics` 2022-12-12 13:25:42 +01:00
Stefan Strigler 2a27d2e781 fix: return 409 in case of duplicate 2022-12-09 13:33:34 +01:00
Stefan Strigler 1472cfefd0 fix: flip order of checks to return 404 before 400 2022-12-09 12:53:04 +01:00
Stefan Strigler 1f7c02ecf5 fix: return 400 if node in query doesn't look like a known node 2022-12-09 12:53:02 +01:00
Zaiming (Stone) Shi e1f09d9899 Merge remote-tracking branch 'origin/release-50' into 1208-merge-release-50-back-to-master 2022-12-08 14:27:01 +01:00
Zaiming (Stone) Shi 1c2fc4b6c3 Merge remote-tracking branch 'origin/release-50' into 1206-chore-merge-ee50-to-release-50 2022-12-06 16:35:56 +01:00
Stefan Strigler 1ba66fc722 docs: /trace returns list not single trace 2022-12-05 11:50:52 +01:00
Stefan Strigler f8dd8d652d docs: add swagger error codes for /trace/:name/[log|download] 2022-12-05 11:50:52 +01:00
Stefan Strigler 9100b13db6 docs: fix schema for /trace/:name/log 2022-12-05 11:50:52 +01:00
lafirest 4cc13c4aa5
Merge pull request #9133 from lafirest/fix/limiter_api
fix(limiter): add `limiter` back to the configs API
2022-12-02 10:06:03 +08:00
Erik Timan 28fc2b9ee9 fix(mgmt_api): add missing error codes in schema 2022-12-01 12:20:11 +01:00
firest 88a0c77707 fix(limiter): add `limiter` back to the configs API 2022-12-01 15:07:15 +08:00
Zaiming (Stone) Shi 311e4cd583
Merge pull request #9440 from zmstone/1128-chore-sync-release-branch-back-to-master
1128 chore sync release branch back to master
2022-11-29 11:47:01 +01:00
Zaiming (Stone) Shi b398617614 chore: bump app versions 2022-11-28 21:12:43 +01:00
Zaiming (Stone) Shi 77341e7a3c chore: bump app versions 2022-11-28 21:06:33 +01:00
Zaiming (Stone) Shi 7ee53e5319 Merge tag 'v5.0.11' into dev/ee5.0 2022-11-28 21:02:21 +01:00
Erik Timan 2582c1713e fix: emqx_topic:join/1 instead of filename:join/1
filename:join/1 doesn't work on Windows for joining a topic. We now use
emqx_topic:join/1 instead.
2022-11-28 11:00:18 +01:00
Erik Timan 95faf56077 feat: remove $queue in favor of $shared
This commit removes support for setting shared subscriptions with the
non-standard $queue feature. Shared subscriptions is now part of the MQTT
spec (using $shared) and we will only support that from now on.
2022-11-28 11:00:18 +01:00
Zaiming (Stone) Shi 6ee475d9b1 fix(emqx_authz_api_mnesia): return the right matchers 2022-11-24 20:32:00 +01:00
JianBo He edb35c08a8 chore: refactor ms2qs function type 2022-11-24 20:14:33 +01:00
JianBo He 9786a6c267 refactor(mgmt): convert fuzzy filter func to named func 2022-11-24 20:14:33 +01:00
JianBo He 6d9e1e0d7a test(mgmt): cover emqx_mgmt_api:cluster_query 2022-11-24 20:14:33 +01:00
JianBo He b9c5a5f822 fix(delayed): return correct node name 2022-11-24 20:14:33 +01:00
JianBo He 79a2682fd3 chore: improve the no-conditions query 2022-11-24 20:14:33 +01:00
JianBo He 8a0c468b01 test: refine tests for lots of List HTTP API 2022-11-24 20:14:33 +01:00
JianBo He 09958d9a33 chore: fix diaylzer warnings 2022-11-24 20:14:33 +01:00
JianBo He 8f7337c9d2 chore: return undefined fuzzy searching func 2022-11-24 20:14:33 +01:00
JianBo He 28d391f26c fix(mgmt): collect total number in node_query/cluster_query 2022-11-24 20:14:33 +01:00
JianBo He 1fe9c105aa refactor(mgmt): smplify the node_query/cluster_query implementation 2022-11-24 20:14:33 +01:00
JianBo He 08121e7df6 fix(mgmt): optimize the speed of query tail pages
In the previous, when you query the tail pages, all the front of rows
will be queried out and formatted. It greatly hurts the speed of query.

Currently, we only format the final result rows. i.e, the query for the
last page of data will be 10x faster.
2022-11-24 20:14:33 +01:00
Stefan Strigler afcb33aa20 feat: support publish with properties 2022-11-23 17:04:35 +01:00
Stefan Strigler acef85e11a test: initialize clients in test setup, teardown after test 2022-11-23 17:03:43 +01:00
Zhongwen Deng 65820eb943 fix: can't get default raw config 2022-11-18 15:07:23 +08:00
Zaiming (Stone) Shi 09455edae8 Merge tag 'v5.0.10' into dev/ee5.0 2022-11-16 16:20:30 +01:00
firest d9e7d36580 chore: bump version && update changes 2022-11-14 09:45:38 +08:00
firest 2f4b2ba405 fix(mgmt_api): Convert only what is needed when parsing subscription information 2022-11-14 09:44:22 +08:00
Zaiming (Stone) Shi 30d9143b0e
Merge pull request #9310 from sstrigler/fix-configs-api-for-bad-nodes
fix(emqx_mgmt_api_configs): use 'node' query paramter if given
2022-11-08 18:10:43 +01:00
firest ebaba0c2b1 fix: Revert "feat(banned): clean retained/delayed data when client is banned"
This reverts commit 69701ff578.
2022-11-08 11:36:11 +08:00
Stefan Strigler 1fb441dd9e test: add tests for 'configs?node' 2022-11-07 14:12:21 +01:00
Stefan Strigler 104b1a63d9 test: pass down Opts in request_api/X 2022-11-07 14:12:21 +01:00
Stefan Strigler 8b10b78bce fix(emqx_mgmt_api_configs): use 'node' query paramter if given
also fix result in error case - be compliant to schema and also return correct
http status code
2022-11-07 14:12:20 +01:00
firest 14c8b5ebb1 fix(mgmt): Ensure the CLI will not create useless atom
The log level, the log handler id and the listener id  all of them already exist,
so it's better to avoid the user create a useless atom by mistake input
2022-11-02 16:50:43 +08:00
lafirest 5886db08e0
Merge pull request #9279 from lafirest/fix/binary_to_atom
fix: use binary_to_existing_atom to replace some risky binary_to_atom
2022-11-02 10:57:05 +08:00
firest 60492615ba fix(API): Ensure that the node name is known 2022-11-01 17:28:34 +08:00
Thales Macedo Garitezi 198ddda8bc docs(status_api): add remark about feature introduction versions 2022-10-31 14:10:09 -03:00
Thales Macedo Garitezi 12addc2118
Merge pull request #9230 from thalesmg/status-endpoint-alias-50
feat(mgmt): add alias endpoint for health check
2022-10-31 10:22:17 -03:00
Zhongwen Deng 18235a7125 chore: update emqx_managment bpapi.versions 2022-10-28 09:16:05 +08:00
Zhongwen Deng af79e652da chore: clear dialyzer warning. 2022-10-28 09:16:05 +08:00
Zhongwen Deng ea95f792e0 refactor: multicall node_info to improve /node speed 2022-10-28 09:14:33 +08:00
Thales Macedo Garitezi d0ca79fc9e feat(mgmt): add alias endpoint for health check
This allow use to reference `/status` in the API documentation without
manually editing the `swagger.json` file.
2022-10-27 13:20:04 -03:00
Thales Macedo Garitezi c72f3a0ae9
Merge pull request #9211 from thalesmg/fix-mgmt-endpoint-status-code-v50
fix(mgmt_api): return 503 when emqx is not running in `/status` (5.0)
2022-10-27 11:11:00 -03:00
Zaiming (Stone) Shi c157392452 docs: fix self-closing html tag, change </br> to <br/> 2022-10-27 13:57:18 +02:00
Thales Macedo Garitezi 0eca531e64 feat: add `retry-after` headers to unavailable response 2022-10-25 15:01:05 -03:00
Thales Macedo Garitezi 997a262c96 fix(mgmt_api): return 503 when emqx is not running in `/status` (5.0) 2022-10-24 14:53:41 -03:00
Zaiming (Stone) Shi 93195f7b5b chore: fix introduced_in for new proto APIs 2022-10-24 11:53:51 +02:00
Zaiming (Stone) Shi e3240b52a8 chore: bump app versions 2022-10-24 11:48:17 +02:00
Zaiming (Stone) Shi 508c0e84d0 Merge branch 'release-v50' into master 2022-10-24 11:46:31 +02:00
Zaiming (Stone) Shi d1332b72e7 feat(api/publish): return detailed publish results
Prior to this change, the publish API returns 200 in most of
the cases.
This change provides more insights to the publish result.

For single message publish endpoint (`publish/`):

HTTP error codes are:

200: Everything is OK
202: No subscriber for the topic
400: When mesage is invalid message.
     e.g. bad topic name or QoS out of range.
503: Failed to dispatch the message. e.g. during EMQX restart.

The response body is a JSON object with two fields
`message_id`, and `publish_result`.
The `message_id` is a globally unique ID for tracing.
`publish_result` is `"OK"` when the message is delivered
to at least one subscriber.
Otherwise `"no_subscriber"`.
`publish_result` may also be some other informative
message to hint the failure result, the content of which
may change in the future.

For `publish/bulk` endpoint:

200: When all message in the bulk are published OK
202: If at least one message in the bulk had `"no_subscriber"` result
400: When mesage is invalid message. e.g. bad topic name or
     QoS out of range.
503: When there is at least one message failed at dispatch.

The reply body is a list of JSON objects having the same layout
as for hte `publish` endpoint.
2022-10-20 20:03:27 +02:00
firest bdaadda479 fix(banned): fix nit code 2022-10-18 13:39:48 +08:00
firest 69701ff578 feat(banned): clean retained/delayed data when client is banned 2022-10-18 13:35:09 +08:00
Zhongwen Deng c0ed8b82aa Merge branch 'trace-log-detail-api' of https://github.com/zhongwencool/emqx into trace-log-detail-api 2022-10-17 09:49:55 +08:00
zhongwencool 77a5125366
chore: update apps/emqx_management/src/emqx_mgmt_api_trace.erl
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-10-17 09:45:00 +08:00
Zhongwen Deng 4d9cae0387 feat: get trace file's detail via /trace/:name/log_detail 2022-10-17 09:43:15 +08:00
Ivan Dyachkov f2db35db39 chore: delete unused function clause 2022-10-14 10:46:11 +02:00
Ivan Dyachkov 5a8cab46a9 test: update publish api test suite 2022-10-14 10:17:22 +02:00
Zaiming (Stone) Shi c2f176c1e7 fix(api): publish API only returns message ID 2022-10-14 09:49:46 +02:00
Zhongwen Deng 4579d7fff8 feat: get trace file's detail via /trace/:name/log_detail 2022-10-14 11:38:39 +08:00
JianBo He d43b680f14 chore: add comments to explain`/status` cant be found in swagger docs 2022-10-01 09:40:27 +08:00
JianBo He 7d7b05ae4e chore: update app.src 2022-09-30 23:32:23 +08:00
JianBo He 6589a66710 Merge branch 'update-api-docs' of github.com:HJianBo/emqx into update-api-docs 2022-09-30 23:05:07 +08:00
JianBo He a84c6f938c chore(swagger): caption tags name 2022-09-30 23:04:26 +08:00
JianBo He 8292572da6
chore: apply suggestions from code review
Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
2022-09-30 23:02:28 +08:00
JianBo He d17c473dc2 chore(i18n): fix the bad desc for statsd 2022-09-30 18:57:08 +08:00
zhouzb 0975bf21a9 docs: improve api desc for statsd 2022-09-30 17:55:12 +08:00
zhouzb f08982be93 chore: improve api desc for alarms 2022-09-30 15:34:49 +08:00
zhouzb d1a15f1a43 chore: improve api descs for banned 2022-09-30 15:05:01 +08:00
Shawn dfe14be8b2 chore: bump app vsns 2022-09-26 18:23:28 +08:00
Shawn 4135910b42 chore: merge master into dev/ee5.0 2022-09-26 09:52:33 +08:00
JimMoen 85835256f1 Merge tag 'v5.0.8' into merge-release-v5.0.8-into-master 2022-09-23 16:06:44 +08:00
Zhongwen Deng 0241185225 chore: Add test coverage for listeners API 2022-09-19 18:25:25 +08:00
zhouzb 2c7d518c19
Merge pull request #8851 from zhongwencool/denny-update-local-override-conf
feat: deny hot updates to the configuration in local-override.conf
2022-09-13 18:49:51 +08:00
Zaiming (Stone) Shi 4534966e36 Merge remote-tracking branch 'origin/master' into dev/ee5.0 2022-09-13 12:16:54 +02:00
firest 5ba31cb192 fix(api): add listener create API from `POST /listeners/{type:name}` to `POST /listeners`
Old:
    API: POST /listeners/{type:demo}
    Body: {"type" : "tcp", "id" : "tcp:demo"}
New:
    API: POST /listeners
    Body: {"type" : "tcp", "name" : "demo"}
2022-09-09 10:46:42 +08:00
firest 47b35f0c6a fix(api): add listener create API from `POST /listeners/{type:name}` to `POST /listeners`
Old:
    API: POST /listeners/{type:demo}
    Body: {"type" : "tcp", "id" : "tcp:demo"}
New:
    API: POST /listeners
    Body: {"type" : "tcp", "name" : "demo"}
2022-09-08 20:28:40 +08:00
zhongwencool 0e633f87b3
Merge branch 'master' into denny-update-local-override-conf 2022-09-08 17:17:07 +08:00
Zaiming (Stone) Shi befc4acced Merge remote-tracking branch 'origin/master' into merge-master-to-ee50-a 2022-09-06 20:31:38 +02:00
Zhongwen Deng 499da1ebe0 chore: add emqx_release:edition_longstr() 2022-09-06 15:46:18 +08:00
Zaiming (Stone) Shi 9408aeb719
Merge pull request #8420 from zmstone/0705-refactor-delete-unused-module
chore: delete unused schema module
2022-09-05 16:33:07 +02:00
Zhongwen Deng d73f22181d chore: fix dialyzer warning. 2022-09-05 15:02:50 +08:00
Zhongwen Deng 57cc880977 chore: change community to opensource 2022-09-05 14:27:47 +08:00
Zhongwen Deng d447659365 feat: add edition info to /nodes api 2022-09-05 11:29:49 +08:00
JimMoen d533e35df0 chore: update app vsn 2022-09-02 22:26:21 +08:00
Zhongwen Deng 1cb281fbc4 fix: return 503 if dashboard's router not ready 2022-08-31 15:45:54 +08:00
Zhongwen Deng 5718b28eeb feat: Deny hot updates to the configuration in local-override.conf 2022-08-31 14:55:10 +08:00
Zaiming (Stone) Shi 2eb078ff3b chore: bump changed app versions 2022-08-26 14:32:28 +02:00
zhouzb ecb79716ad
Merge branch 'master' into merge-506-to-master 2022-08-26 17:40:26 +08:00
JianBo He 97b9d378a5 Merge tag 'v5.0.6' into merge-506-to-master 2022-08-23 09:08:55 +08:00
ieQu1 ff0c44b67d refactor(emqx_management): Export transactions 2022-08-22 21:29:13 +02:00
JianBo He 7ffdd95aa3 chore: bind option support `:1883` style config
see: https://github.com/emqx/emqx/pull/8571
2022-08-19 11:12:17 +08:00
Zhongwen Deng 49b95b0aa8 chore: improve swagger tags 2022-08-17 23:32:19 +08:00
Zaiming (Stone) Shi 256cdd50ff chore: delete unused schema module 2022-08-17 08:33:15 +02:00
firest 48a761c406 fix(mgmt): fix `$queue` topic name error in this API return 2022-08-15 17:26:25 +08:00
firest dfa63ff3b1 fix(mgmt): remove the `will_msg` field from the client API 2022-08-15 10:22:18 +08:00
firest dee92bb8b8 fix(mgmt): fix status api test case error 2022-08-09 11:22:48 +08:00
firest 01ba45cc37 fix(mgmt): remove the `/api/v5` prefix of status API 2022-08-08 17:34:18 +08:00
Zhongwen Deng fd7c97735d chore: make sure path is binary 2022-08-03 12:58:20 +08:00
Zhongwen Deng a19514f000 chore: bump emqx_management to 5.0.3 2022-08-03 12:34:30 +08:00
Zhongwen Deng 4869225395 chore: update Running/Stopped to running/stopped 2022-08-03 12:24:03 +08:00
JianBo He 257e310931 chore: ensure the `bind` output style
e.g:
- Configured as `1883`, printed as `:1883`
- Configured as `0.0.0.0:1883`, printed as `:1883`
- Configured as `127.0.0.1:1883`, printed as `127.0.0.1:1883`
- Configured as `::1:1883`, printed as `[::1]:1883`
- Configured as `[::1]:1883`, printed as `[::1]:1883`
2022-07-26 19:02:04 +08:00
JianBo He 53fda85c93 fix: conflicts resolving legacy 2022-07-26 11:10:40 +08:00
JianBo He bad82b29ce feat(gw): change the listeners api fields 2022-07-26 11:05:04 +08:00
JianBo He 2c71d27a89 feat(listeners): change the `GET /listeners` api fields 2022-07-26 11:04:33 +08:00
zhongwencool 80831a7593
Merge pull request #8563 from zhongwencool/titlecase-swagger-tags
chore: make sure swagger's tags always titlecase
2022-07-25 17:45:54 +08:00
Zhongwen Deng a3296078c3 chore: make sure swagger's tags always titlecase 2 2022-07-25 16:55:38 +08:00
zhongwencool cc63479e69 chore: update apps/emqx_management/src/emqx_mgmt_api_publish.erl
Co-authored-by: zhouzb <zhouzb@emqx.io>
2022-07-25 16:55:33 +08:00
zhongwencool 087a098d64 chore: update apps/emqx_management/src/emqx_mgmt_api_publish.erl
Co-authored-by: zhouzb <zhouzb@emqx.io>
2022-07-25 16:55:25 +08:00
Zhongwen Deng dd59c850e0 chore: make sure swagger's tags always titlecase 2022-07-25 16:09:17 +08:00
JianBo He e0b33dc258 fix(listener): support listen on ipv6 address 2022-07-25 09:31:16 +08:00
Zhongwen Deng f080715ce9 fix: ensure /listeners API return all node's status 2022-07-21 15:47:11 +08:00
Zhongwen Deng 116c664df1 feat: add sysmon config handler to reload conf 2022-07-21 12:33:56 +08:00
Zhongwen Deng 26820ed0c4 chore: remove /configs/listeners, we should use /listeners/ API 2022-07-14 15:23:39 +08:00
DDDHuang 941440800b fix(cli): subscriptions with sub options, qos rh rap nl; admins response
data format
2022-07-13 15:55:07 +08:00
JimMoen 2ad99fca7a chore: update appup.src 2022-07-01 21:07:33 +08:00
DDDHuang 25c37a63ef
Merge pull request #8356 from DDDHuang/pubsub_api
Pubsub api
2022-07-01 17:24:18 +08:00
DDDHuang 07f8a93af3 fix: update mgmt bpapi version 2022-07-01 16:43:42 +08:00
firest 325997c592 fix(api): temporarily hide the limiter's API 2022-07-01 16:31:56 +08:00
DDDHuang 6c9cad366b fix(api): client sub & unsub batch 2022-07-01 15:21:11 +08:00
DDDHuang 4f95f097f7 fix: publish api rename param from - clientid 2022-07-01 09:19:19 +08:00
Zhongwen Deng 9768e302c2 chore: mv i18n.conf to emqx_dashboard/priv/ 2022-06-30 21:15:57 +08:00
Zhongwen Deng eb6977f23e fix: display The log path has not been set when can't find log_path 2022-06-30 21:15:57 +08:00
Zaiming (Stone) Shi 18f3920a73 feat: add --json option to 'emqx ctl cluster status' command 2022-06-23 21:59:11 +02:00
Zaiming (Stone) Shi a6f111798b fix(emqx_management): fix topics (routes) cli list command 2022-06-22 00:06:26 +02:00
JianBo He 5bde280b5f chore: update apps/emqx_management/src/emqx_mgmt_api_listeners.erl 2022-06-17 18:47:59 +08:00
JianBo He 03d3fc42c7 fix(mgmt): avoid to HTTP dispatch failure due to an URI defination conflict
Since we bave defined
- `listeners/{listener_id}/authentication` in emqx_authn_api.erl
- and `listeners/{id}/{action}` in emqx_mgmt_api_listeners.erl

The HTTP Router always dispatch the `.../authentication` request to `listeners/{id}/{action}`,
which cause a no_union_member checking error.

In this PR, we make a workaround to avoid this dispatch error
2022-06-17 18:17:25 +08:00
Zhongwen Deng 634a75341a fix: remove nonexistent listener should always return ok 2022-06-16 11:33:24 +08:00
Zhongwen Deng c6271de174 fix: restart started listener when listener connection options update 2022-06-16 11:26:54 +08:00
Zhongwen Deng 36af3d066f feat: add enabled for listeners 2022-06-15 14:39:58 +08:00
Zaiming (Stone) Shi 01118cb804
Merge pull request #8195 from zmstone/0613-refactor-display-rfc3339
refactor: expose rfc3339 datetime string
2022-06-13 14:19:19 +01:00
Zaiming (Stone) Shi b18290626d
Merge pull request #8194 from zmstone/0613-uptime-format-as-string-in-cli-printout
fix: uptime display in CLI printout should be human-readable
2022-06-13 13:55:42 +01:00
Zaiming (Stone) Shi 10add62206 refactor: expose rfc3339 datetime string 2022-06-13 11:56:07 +02:00
Zaiming (Stone) Shi ba23771a0a fix: uptime display in CLI printout should be human-readable 2022-06-13 11:44:26 +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 5e92ef54c5 fix: ct failed 2022-06-07 20:13:57 +08:00
Zhongwen Deng dd873147b3 feat: make tcp/ssl options more straightforward 2022-06-07 17:17:06 +08:00
Zaiming (Stone) Shi cd9811fe15
Merge pull request #8090 from zmstone/0531-fix-ensure-binary-from-size-format
fix: ensure bin-string returned from mgmt size format function
2022-05-31 14:09:31 +01:00
zhouzb 78adeea297
Merge pull request #8096 from zmstone/0531-fix-mac-mem-stat
fix(emqx_mgmt): return 0 for non-linux systems
2022-05-31 20:55:53 +08:00
Zaiming (Stone) Shi a2db7226c9 fix(emqx_mgmt): return 0 for non-linux systems 2022-05-31 14:09:56 +02:00
Zhongwen Deng 6c9b959651 fix: ct failed 2022-05-31 19:20:27 +08:00
Zaiming (Stone) Shi 6062bc248d fix: ensure bin-string returned from mgmt size format function 2022-05-31 11:04:09 +02:00
Zaiming (Stone) Shi eacd3847ed fix(emqx_mgmt): show used and total ram from lc 2022-05-27 14:04:30 +02:00
JianBo He 1867b86bad fix(mgmt): return null instead of "undefined" string 2022-05-12 19:26:14 +08:00
Zhongwen Deng f0cb72dda6 fix: telemetry can't get active plugins list 2022-05-12 11:18:44 +08:00
zhongwencool 16b6c2f849
Merge pull request #7921 from zhongwencool/add-node-query-string-to-download-tracelog
feat: add node query_string to download logs for specific nodes
2022-05-12 10:26:47 +08:00
Zhongwen Deng 7c65d7159b feat: add node query_string to download logs for specific nodes 2022-05-11 23:19:06 +08:00
firest c9227703fc fix(listener): when update listener conf, should override limiter config not merge 2022-05-11 14:00:54 +08:00
zhongwencool 0924c7dc13
Merge pull request #7902 from DDDHuang/ddd_fix
fix: node info, log path only path
2022-05-10 21:47:26 +08:00
DDDHuang 76102714aa fix: node info, log path only path 2022-05-10 18:00:09 +08:00
Zhongwen Deng e6e66b032e fix: mgmt_cli_SUITE ct failed 2022-05-10 09:38:48 +08:00
Zhongwen Deng 2371604589 fix: infinity means never expire 2022-05-09 14:43:37 +08:00
JianBo He 8db8598622 fix(mgmt): fix test case crash 2022-05-07 10:16:58 +08:00
JianBo He 2ef118ce4c chore(fmt): format management 2022-05-07 10:16:58 +08:00
lafirest 495ef7f301
Merge pull request #7879 from lafirest/fix/listener_with_limiter
fix(listeners): add limiter info into the listener config
2022-05-06 20:34:57 +08:00
firest acba1626f6 fix(mgmt): change the argument position of limiter APIs 2022-05-06 16:37:53 +08:00
firest b394d18852 fix(listeners): add limiter info into the listener config 2022-05-06 13:33:03 +08:00
JianBo He ae2c150384
Merge pull request #7593 from EMQ-YangM/improve_mgmt_cli_cover
draft: improve emqx_mgmt_cli test coverage
2022-05-06 09:10:10 +08:00
lafirest 97e778e797
Merge pull request #7868 from lafirest/feat/limiter_api
feat(limiter): add limiter view/update api
2022-05-05 19:08:47 +08:00
firest f2e7563b0c feat(limiter): add limiter view/update api 2022-05-05 13:08:33 +08:00
JianBo He 7813f402c6 feat(api-clients): return client mountpoint property 2022-05-03 16:52:38 +08:00
Zhongwen Deng cf9a853069 fix: delete duplicate clientid/username 2022-04-29 16:33:49 +08:00
Zhongwen Deng bfdd86b3fd fix: reset config not work in cluster 2022-04-29 11:45:22 +08:00
Zhongwen Deng 352984efe7 fix: dashboard https without deafult pem/keyfile 2022-04-29 11:45:22 +08:00
Zhongwen Deng 35d066e3d5 fix: delete plugin from configure when uninstall 2022-04-29 00:55:21 +08:00
zhongwencool bd2abd9ce0
Merge pull request #7810 from zhongwencool/bad-plugin-file-500-crash
fix: bad plugin file upload crash
2022-04-28 16:14:32 +08:00
Zhongwen Deng e8cead48b2 fix: bad plugin file crash 2022-04-28 14:26:25 +08:00
Zhongwen Deng 2c95fba4df fix: api_listener min TLS ct fail 2022-04-28 10:11:38 +08:00
zhongwencool 6825aa66fc
Merge pull request #7780 from zhongwencool/log-bug-fix
fix: make logger config more friendly 🤖
2022-04-27 19:42:20 +08:00