Michael Klishin
de3bca0658
memory_breakdown: correctly format for CSV
2019-01-30 21:47:07 +03:00
Michael Klishin
7db0d6ee01
Present correct name for `rabbitmq-diagnostics check_alarms`
2019-01-30 16:08:46 +03:00
Michael Klishin
724dbca331
Merge pull request #303 from rabbitmq/await_startup_with_a_timeout
...
New command: `rabbitmqctl await_startup`
2019-01-28 21:06:41 +03:00
Michael Klishin
5fad316390
New command: `rabbitmqctl await_startup`
...
Like `rabbitmqctl wait` but doesn't use a pid file path.
Pair: @gerhard.
References rabbitmq/rabbitmq-server#1848 .
2019-01-28 20:45:08 +03:00
Arnaud Cogoluègnes
606b72b5a6
Add active to default fields for list_consumers
...
[#163298456 ]
References rabbitmq/rabbitmq-server#1839
2019-01-24 18:26:39 +01:00
Arnaud Cogoluègnes
1732932f7b
Merge branch 'master' into rabbitmq-server-1838-active-field-for-consumers
2019-01-24 10:46:58 +01:00
Michael Klishin
7c44eeb0d9
Move get_formatter/2, get_printer/2 and friends to RabbitMQ.CLI.Core.Config
...
To avoid RabbitMQCtl being used as a library module and because
they both are effectively generic configurable settings.
2019-01-24 11:11:04 +03:00
Michael Klishin
d767b4520b
Merge branch 'master' into formatter_switches
2019-01-24 10:57:34 +03:00
Michael Klishin
a6cf0c5539
Correct protocol labels for STOMP and MQTT
2019-01-24 10:37:36 +03:00
Daniil Fedotov
e6530d6799
Make it possible for formatters to define arguments.
...
Add new callbacks to formatter_behavior: switches/0 and aliases/0
Merge them with command switches and aliases on parsing.
There is an example switch in the table formatter, enabling header padding.
2019-01-23 18:04:12 -05:00
Michael Klishin
e8729c5de0
Introduce 'rabbitmq-diagnostics check_port_connectivity'
2019-01-23 22:30:20 +03:00
Michael Klishin
ad23b37e3f
Introduce 'rabbitmq-diagnostics check_port_listener <port>'
...
Part of #292 .
2019-01-23 19:13:08 +03:00
Michael Klishin
bd618db9cd
Introduce 'rabbitmq-diagnostics check_protocol_listener'
...
Part of #292 .
2019-01-23 17:45:37 +03:00
Michael Klishin
3f9c982d44
Standardize on :not_enough_args
...
That's what most commands use and the execution pipeline
expects.
2019-01-23 15:20:24 +03:00
Michael Klishin
9a134415fc
More typos
2019-01-23 14:15:38 +03:00
Michael Klishin
fefc8047dc
One more typo
2019-01-23 14:15:26 +03:00
Michael Klishin
ad5902a5f8
Clarify
2019-01-23 14:14:50 +03:00
Michael Klishin
9df7048425
Correct a moduledoc typo
2019-01-23 14:14:20 +03:00
Michael Klishin
53f064b989
Remove an unused alias
2019-01-23 10:49:27 +03:00
Michael Klishin
5c4ed6b912
Format generic error triplets
2019-01-23 10:44:19 +03:00
Michael Klishin
94d5216e68
New check command: 'rabbitmq-diagnostics check_running'
...
Like is_running but will exit with a non-0 code if the app is
not running on the target node.
2019-01-23 10:43:12 +03:00
Michael Klishin
51d7490bd7
Use exit code of 69 (EX_UNAVAILABLE) by default
...
Per [1], which is still the best guide on the subject we could find,
EX_UNAVAILABLE makes more sense as a catch-all error compared to EX_SOFTWARE.
Per discussion with @gerhard.
1. https://www.freebsd.org/cgi/man.cgi?query=sysexits&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE&arch=default&format=html
2019-01-23 10:20:46 +03:00
Michael Klishin
58a66af140
Refactoring
2019-01-23 10:12:27 +03:00
Michael Klishin
18ff37665c
Change rabbitmq-diagnostics is_booting and is_running to be info commands
...
This means that even in the "negative" response they exit with a 0
status code. In other words, they just tell the user the state of things
without asserting on what constitutes a success or failure.
This is consistent with some recently introduced diagnostics commands:
some are "informational" (simply provide an insight into the state
of the node) and others are checks (optinionated, consider certain
conditions to be faulty and exit with a non-zero exit code).
References #292 .
2019-01-23 08:49:05 +03:00
Michael Klishin
b87678ee99
Follow command naming pattern in file names, too
2019-01-23 07:29:51 +03:00
Michael Klishin
dbbb475b16
Fix compiler warnings
2019-01-22 13:53:49 +03:00
Michael Klishin
cf226bb004
Tests and revisions for 'rabbitmq-diagnostics check[_local]_alarms'
...
References #292 .
2019-01-22 13:28:42 +03:00
Michael Klishin
4bc3e51461
Introduce rabbitmq-diagnostics check[_local]_alarms
...
References #292 .
2019-01-22 13:28:42 +03:00
Michael Klishin
aad1c3ae0e
Correct local vs. global alarm filtering
2019-01-22 13:27:52 +03:00
Michael Klishin
44e453fe25
Initial version of rabbitmq-diagnostics alarms
2019-01-22 13:27:51 +03:00
Michael Klishin
4d9c6462f1
Enquote listener interface for machine-readable formats, too
2019-01-22 12:26:28 +03:00
Michael Klishin
e938a6c1e1
Initial version of the 'rabbitmq-diagnostics listeners' command
...
Part of #292 .
2019-01-22 12:26:28 +03:00
Michael Klishin
1722a085d9
JSON formatter: flatten the stream before formatting
...
Otherwise JSON array items are enclosed in an array, which unlikely
was the intent.
(cherry picked from commit b66751490798d1b374a0ffde73307b84f510f420)
2019-01-22 11:49:27 +03:00
Arnaud Cogoluègnes
ca396e0ce5
Add active and activity status fields to list_consumers
...
[#163298456 ]
References rabbitmq/rabbitmq-management#1838
2019-01-21 14:36:53 +01:00
Michael Klishin
08fb2b77fb
Copy, list plugins that are not enabled
2019-01-21 13:36:58 +03:00
Michael Klishin
e54134baa5
Code style
2019-01-21 13:29:52 +03:00
Michael Klishin
a6338ba134
Use return code of 69 Unavailable here
2019-01-21 13:29:33 +03:00
Michael Klishin
84c1d51c92
Introducee rabbitmq-plugins is_enabled [plugin 1] [plugin 2] [...]
...
Part of #292 .
2019-01-21 11:02:10 +03:00
Michael Klishin
be2c1e7101
Introoduce rabbitmq-diagnostics is_running, is_booting
2019-01-20 07:33:40 +03:00
Michael Klishin
b6f4d75afc
Update (c) year
2019-01-20 06:10:59 +03:00
Arnaud Cogoluègnes
c6d4fcf19d
Add single active field to list_consumers command
...
[#163089472 ]
References rabbitmq/rabbitmq-management#649
2019-01-16 10:38:57 +01:00
Michael Klishin
9479a466f5
Revert "Pad info items in the table formatter to be at least as wide as header."
...
This reverts commit fc4264224a .
This is a breaking change for tools that parse list_* command tables
and after revisiting our own test suites I'm not sure it's worth the burden.
2018-12-29 01:44:16 +03:00
Daniil Fedotov
fc4264224a
Pad info items in the table formatter to be at least as wide as header.
2018-12-28 17:42:21 +04:00
Michael Klishin
d0ea645ea3
New command: rabbitmq-diagnostics tls_versions
...
Like cipher_suites but for supported (available in the runtime)
TLS versions.
[#162832991 ]
2018-12-24 15:25:35 +03:00
Luke Bakken
f1b6283e9f
Format changed file with "mix format"
2018-12-19 16:14:43 -08:00
Luke Bakken
7629703ca4
Add chunks equal to number of nodes
...
Fixes #284
2018-12-19 14:44:53 -08:00
Michael Klishin
ac653965f4
Improve error message formatting for rabbitmq-plugins commands
...
There are two main types of errors that I see in practice:
* Insufficient enabled plugins file permission (or the file does not exist)
* Enabled plugins file used by CLI tools does not match that of
the target node
[#162757498 ]
2018-12-19 15:54:23 +03:00
Michael Klishin
e0e33f4b73
New diagnostics command: runtime_thread_stats
...
Uses Erlang's microstate accounting data to produce
high level thread state/activity breakdown.
Per discussion with @gerhard.
2018-12-07 18:43:48 +03:00
Luke Bakken
b523093c3e
Port Erlang/OTP node name code to Elixir
...
Follow-up to #278
Add another test case, fix bugs
Add another test
Start converting to new code
Node name related code is in NodeName module
Distribution not needed for Helpers tests
Add test for rabbit@localhost when longnames in use
No need to guess on domain in this spot
Fix behavior on OS X
2018-12-05 11:23:17 -08:00
Luke Bakken
5861d2da3b
Do not raise error as offline commands will crash
2018-11-30 15:02:22 -08:00