Docs: add missing diagnostics and ctl commands

[#168775486]
This commit is contained in:
dcorbacho 2019-09-25 11:51:40 +01:00
parent 9aa4f3f641
commit 5baec1451d
2 changed files with 1624 additions and 1330 deletions

View File

@ -130,18 +130,368 @@ results.
The default value is
.Qq / .
.Bl -tag -width Ds
.El
.El
.Ss Help
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm help
.Pp
Displays general help and commands supported by
.Nm .
.\" ------------------------------------
.It Cm ping
.It Cm version
.Pp
Most basic health check. Succeeds if target node (runtime) is running
and
.Nm
can authenticate with it successfully.
Displays CLI tools version
.El
.El
.Ss Nodes
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm wait
See
.Cm wait
in
.Xr rabbitmqctl 8
.El
.El
.Ss Cluster
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm cluster_status
See
.Cm cluster_status
in
.Xr rabbitmqctl 8
.El
.El
.Ss Users
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_users
See
.Cm list_users
in
.Xr rabbitmqctl 8
.El
.El
.Ss Access Control
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_permissions Op Fl p Ar vhost
See
.Cm list_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_topic_permissions Op Fl p Ar vhost
See
.Cm list_topic_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_user_permissions Ar username
See
.Cm list_user_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_user_topic_permissions Ar username
See
.Cm list_user_topic_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_vhosts Op Ar vhostinfoitem ...
See
.Cm list_vhosts
in
.Xr rabbitmqctl 8
.El
.El
.Ss Monitoring, observability and health checks
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm alarms
.Pp
Lists resource alarms, if any, in the cluster.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics alarms
.\" ------------------------------------
.It Cm check_alarms
.Pp
Health check that fails (returns with a non-zero code) if there are alarms
in effect on any of the cluster nodes.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_alarms
.\" ------------------------------------
.It Cm check_local_alarms
.Pp
Health check that fails (returns with a non-zero code) if there are alarms
in effect on the target node.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_local_alarms
.\" ------------------------------------
.It Cm check_port_connectivity
.Pp
Health check that fails (returns with a non-zero code) if any listener ports
on the target node cannot accept a new TCP connection opened by
.Nm.
The check only validates if a new TCP connection is accepted. It does not
perform messaging protocol handshake or authenticate.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_port_connectivity
.\" ------------------------------------
.It Cm check_port_listener
.Pp
Health check that fails (returns with a non-zero code) if the target node
is not listening on the specified port (there is no listener that
uses that port).
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_port_listener 5672
.\" ------------------------------------
.It Cm check_protocol_listener
.Pp
Health check that fails (returns with a non-zero code) if the target node
does not have a listener for the specified protocol.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_protocol_listener mqtt
.\" ------------------------------------
.It Cm check_running
.Pp
Health check that fails (returns with a non-zero code) if the RabbitMQ
application is not running on the target node.
.Pp
If
.Cm rabbitmqctl(8)
was used to stop the application, this check will fail.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_running
.\" ------------------------------------
.It Cm check_virtual_hosts
.Pp
Health check that checks if all vhosts are running in the target node
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_virtual_hosts --timeout 60
.\" ------------------------------------
.It Cm cipher_suites
.Pp
Lists cipher suites enabled by default. To list all available cipher suites, add the --all argument.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics cipher_suites --format openssl --all
.\" ------------------------------------
.It Cm command_line_arguments
.Pp
Displays target node's command-line arguments and flags as reported by the runtime.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics command_line_arguments -n rabbit@hostname
.\" ------------------------------------
.It Cm consume_event_stream
.Pp
Streams internal events from a running node. Output is jq-compatible.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics consume_event_stream -n rabbit@hostname --duration 20 --pattern "queue_.*"
.\" ------------------------------------
.It Cm discover_peers
.Pp
Runs a peer discovery on the target node and prints the discovered nodes, if any.
.Pp
See
.Lk https://www.rabbitmq.com/cluster-formation.html "RabbitMQ Cluster Formation guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics discover_peers --timeout 60
.\" ------------------------------------
.It Cm environment
See
.Cm environment
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm erlang_cookie_hash
.Pp
Outputs a hashed value of the shared secret used by the target node
to authenticate CLI tools and peers. The value can be compared with the hash
found in error messages of CLI tools.
.Pp
See
.Lk https://www.rabbitmq.com/clustering.html#erlang-cookie "RabbitMQ Clustering guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics erlang_cookie_hash -q
.\" ------------------------------------
.It Cm erlang_version
.Pp
Reports target node's Erlang/OTP version.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics erlang_version -q
.\" ------------------------------------
.It Cm is_booting
.Pp
Reports if RabbitMQ application is currently booting (not booted/running or stopped) on
the target node.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics is_booting
.\" ------------------------------------
.It Cm is_running
.Pp
Reports if RabbitMQ application is fully booted and running (that is, not stopped) on
the target node.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics is_running
.\" ------------------------------------
.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ...
See
.Cm list_bindings
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.ll.It Cm list_channels Op Ar channelinfoitem ...
See
.Cm list_channels
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_ciphers
See
.Cm list_ciphers
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_connections Op Ar connectioninfoitem ...
See
.Cm list_connections
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_consumers Op Fl p Ar vhost
See
.Cm list_consumers
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ...
See
.Cm list_exchanges
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_hashes
See
.Cm list_hashes
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_queues Oo Fl p Ar vhost Oc Oo Fl -offline | Fl -online | Fl -local Oc Op Ar queueinfoitem ...
See
.Cm list_queues
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_unresponsive_queues Oc Oo Fl -local Oc Oo Fl -queue_timeout Ar milliseconds Oc Oo Ar column ... Oc Op Fl -no-table-headers
See
.Cm list_unresponsive_queues
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm listeners
.Pp
Lists listeners (bound sockets) on this node. Use this to inspect
what protocols and ports the node is listening on for client, CLI tool
and peer connections.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics listeners
.\" ------------------------------------
.It Cm log_tail Oc Oo Fl -number Ar number | Fl N Ar number Oc Op Fl -timeout Ar milliseconds
.Pp
Prints the last N lines of the log on the node
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics log_tail -number 100
.\" ------------------------------------
.It Cm log_tail_stream Oc Oo Fl -duration Ar seconds | Fl d Ar seconds Oc Op Fl -timeout Ar milliseconds
.Pp
Streams logs from a running node for a period of time
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics log_tail_stream --duration 60
.\" ------------------------------------
.It Cm maybe_stuck
.Pp
Periodically samples stack traces of all Erlang processes
("lightweight threads") on the node. Reports the processes for which
stack trace samples are identical.
.Pp
Identical samples may indicate that the process is not making any progress
but is not necessarily an indication of a problem.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics maybe_stuck -q
.\" ------------------------------------
.It Cm memory_breakdown Op Fl -unit Ar memory_unit
.Pp
@ -166,34 +516,26 @@ Example:
.sp
.Dl rabbitmq-diagnostics memory_breakdown --unit gigabytes
.\" ------------------------------------
.It Cm server_version
.It Cm observer Op Fl -interval Ar seconds
.Pp
Reports target node's version.
Starts a CLI observer interface on the target node
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics server_version -q
.Dl rabbitmq-diagnostics observer --interval 10
.\" ------------------------------------
.It Cm erlang_version
.It Cm ping
.Pp
Reports target node's Erlang/OTP version.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics erlang_version -q
Most basic health check. Succeeds if target node (runtime) is running
and
.Nm
can authenticate with it successfully.
.\" ------------------------------------
.It Cm maybe_stuck
.Pp
Periodically samples stack traces of all Erlang processes
("lightweight threads") on the node. Reports the processes for which
stack trace samples are identical.
.Pp
Identical samples may indicate that the process is not making any progress
but is not necessarily an indication of a problem.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics maybe_stuck -q
.It Cm report
See
.Cm report
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm runtime_thread_stats Op Fl -sample-interval Ar interval
.Pp
@ -208,6 +550,27 @@ Example:
.Sp
.Dl rabbitmq-diagnostics runtime_thread_stats --sample-interval 15
.\" ------------------------------------
.It Cm schema_info Oc Oo Fl -no_table_headers Oc Oo Ar column ... Oc Op Fl -timeout Ar milliseconds
.Pp
See
.Cm schema_info
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm server_version
.Pp
Reports target node's version.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics server_version -q
.\" ------------------------------------
.It Cm status
See
.Cm status
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm tls_versions
.Pp
Lists all TLS versions supported by the runtime on the target node.
@ -221,243 +584,10 @@ to learn more.
Example:
.Sp
.Dl rabbitmq-diagnostics tls_versions -q
.\" ------------------------------------
.It Cm erlang_cookie_hash
.Pp
Outputs a hashed value of the shared secret used by the target node
to authenticate CLI tools and peers. The value can be compared with the hash
found in error messages of CLI tools.
.Pp
See
.Lk https://www.rabbitmq.com/clustering.html#erlang-cookie "RabbitMQ Clustering guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics erlang_cookie_hash -q
.\" ------------------------------------
.It Cm discover_peers
.Pp
Runs a peer discovery on the target node and prints the discovered nodes, if any.
.Pp
See
.Lk https://www.rabbitmq.com/cluster-formation.html "RabbitMQ Cluster Formation guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics discover_peers --timeout 60
.\" ------------------------------------
.It Cm list_channels Op Ar channelinfoitem ...
See
.Cm list_channels
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_queues Oo Fl p Ar vhost Oc Oo Fl -offline | Fl -online | Fl -local Oc Op Ar queueinfoitem ...
See
.Cm list_queues
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ...
See
.Cm list_exchanges
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ...
See
.Cm list_bindings
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_connections Op Ar connectioninfoitem ...
See
.Cm list_connections
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_channels Op Ar channelinfoitem ...
See
.Cm list_channels
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_consumers Op Fl p Ar vhost
See
.Cm list_consumers
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm alarms
.Pp
Lists resource alarms, if any, in the cluster.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics alarms
.\" ------------------------------------
.It Cm listeners
.Pp
Lists listeners (bound sockets) on this node. Use this to inspect
what protocols and ports the node is listening on for client, CLI tool
and peer connections.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics listeners
.\" ------------------------------------
.It Cm is_running
.Pp
Reports if RabbitMQ application is fully booted and running (that is, not stopped) on
the target node.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics is_running
.\" ------------------------------------
.It Cm is_booting
.Pp
Reports if RabbitMQ application is currently booting (not booted/running or stopped) on
the target node.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics is_booting
.\" ------------------------------------
check_port_connectivity [-t <timeout>]
.\" ------------------------------------
.It Cm check_running
.Pp
Health check that fails (returns with a non-zero code) if the RabbitMQ
application is not running on the target node.
.Pp
If
.Cm rabbitmqctl(8)
was used to stop the application, this check will fail.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_running
.\" ------------------------------------
.It Cm check_local_alarms
.Pp
Health check that fails (returns with a non-zero code) if there are alarms
in effect on the target node.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_local_alarms
.\" ------------------------------------
.It Cm check_alarms
.Pp
Health check that fails (returns with a non-zero code) if there are alarms
in effect on any of the cluster nodes.
.Pp
See
.Lk https://www.rabbitmq.com/alarms.html "RabbitMQ Resource Alarms guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_alarms
.\" ------------------------------------
.It Cm check_port_connectivity
.Pp
Health check that fails (returns with a non-zero code) if any listener ports
on the target node cannot accept a new TCP connection opened by
.Nm.
The check only validates if a new TCP connection is accepted. It does not
perform messaging protocol handshake or authenticate.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_port_connectivity
.\" ------------------------------------
.It Cm check_protocol_listener
.Pp
Health check that fails (returns with a non-zero code) if the target node
does not have a listener for the specified protocol.
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_protocol_listener mqtt
.\" ------------------------------------
.It Cm check_port_listener
.Pp
Health check that fails (returns with a non-zero code) if the target node
is not listening on the specified port (there is no listener that
uses that port).
.Pp
See
.Lk https://www.rabbitmq.com/networking.html "RabbitMQ Networking guide"
to learn more.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics check_port_listener 5672
.\" ------------------------------------
.It Cm consume_event_stream
.Pp
Streams internal events from a running node. Output is jq-compatible.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics consume_event_stream -n rabbit@hostname --duration 20 --pattern "queue_.*"
.\" ------------------------------------
.It Cm command_line_arguments
.Pp
Displays target node's command-line arguments and flags as reported by the runtime.
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics command_line_arguments -n rabbit@hostname
.\" ------------------------------------
.It Cm status
See
.Cm status
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm cluster_status
See
.Cm cluster_status
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm environment
See
.Cm environment
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm report
See
.Cm report
in
.Xr rabbitmqctl 8
.El
.El
.Ss Parameters
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_global_parameters
See
@ -465,21 +595,19 @@ See
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_operator_policies Op Fl p Ar vhost
See
.Cm list_operator_policies
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_parameters Op Fl p Ar vhost
See
.Cm list_parameters
in
.Xr rabbitmqctl 8
.\" ------------------------------------------------------------------
.It Cm list_permissions Op Fl p Ar vhost
.El
.El
.Ss Policies
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_operator_policies Op Fl p Ar vhost
See
.Cm list_permissions
.Cm list_operator_policies
in
.Xr rabbitmqctl 8
.\" ------------------------------------
@ -489,45 +617,49 @@ See
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_topic_permissions Op Fl p Ar vhost
See
.Cm list_topic_permissions
in
.Xr rabbitmqctl 8
.El
.El
.Ss Virtual hosts
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_user_permissions Ar username
See
.Cm list_user_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_user_topic_permissions Ar username
See
.Cm list_user_topic_permissions
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_users
See
.Cm list_users
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm list_vhosts Op Ar vhostinfoitem ...
See
.Cm list_vhosts
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.It Cm node_health_check
Performs several health checks of the target node.
.It Cm list_vhost_limits Oc Oo Fl -vhost Ar vhost Oc Oo Fl -global Oc Op Fl -no-table-headers
.Pp
Verifies the rabbit application is running and alarms are not set,
then checks that every queue and channel on the node can emit basic stats.
See
.Cm list_vhost_limits
in
.Xr rabbitmqctl 8
.El
.El
.Ss Node configuration
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm log_location Oc Oo Fl -all | Fl a Oc Op Fl -timeout Ar milliseconds
.Pp
Shows log file location(s) on target node
.Pp
Example:
.Sp
.Dl rabbitmq-diagnostics node_health_check -n rabbit@hostname
.Dl rabbitmq-diagnostics log_location -a
.El
.El
.Ss Feature flags
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm list_feature_flags Oc Oo Ar column ... Oc Op Fl -timeout Ar milliseconds
See
.Cm list_feature_flags
in
.Xr rabbitmqctl 8
.\" ------------------------------------
.El
.El
.Ss Queues
.Bl -tag -width Ds
.It Cm quorum_status Ar queue Oc Op Fl -vhost Ar vhost
See
.Cm quorum_status
in
.Xr rabbitmqctl 8
.\" ------------------------------------------------------------------
.Sh SEE ALSO
.\" ------------------------------------------------------------------

File diff suppressed because it is too large Load Diff