rabbitmq-diagnostics — RabbitMQ diagnostics, monitoring and health checks tools
rabbitmq-diagnostics | [-q] [-s] [-l] [-n node] [-t timeout] command [command_options] |
rabbitmq-diagnostics is a command line tool that provides commands used for diagnostics, monitoring and health checks of RabbitMQ nodes. See the RabbitMQ documentation guides to learn more about RabbitMQ diagnostics, monitoring and health checks.
rabbitmq-diagnostics allows the operator to inspect node and cluster state. A number of health checks are available to be used interactively and by monitoring tools.
By default if it is not possible to connect to and authenticate with the target node (for example if it is stopped), the operation will fail. To learn more, see the RabbitMQ Monitoring guide
Most commands provided by rabbitmq-diagnostics inspect node and cluster state or perform health checks.
Commands that list topology entities (e.g. queues) use tab as column delimiter. These commands and their arguments are delegated to rabbitmqctl(8).
Some commands ( list_queues, list_exchanges, list_bindings and list_consumers) accept an optional vhost parameter.
The list_queues, list_exchanges and list_bindings commands accept an optional virtual host parameter for which to display results. The default value is "/".
Prints usage for all available commands.
Displays CLI tools version
See wait in rabbitmqctl(8)
See cluster_status in rabbitmqctl(8)
See list_users in rabbitmqctl(8)
See list_permissions in rabbitmqctl(8)
See list_topic_permissions in rabbitmqctl(8)
See list_user_permissions in rabbitmqctl(8)
See list_user_topic_permissions in rabbitmqctl(8)
See list_vhosts in rabbitmqctl(8)
Lists resource alarms, if any, in the cluster.
See RabbitMQ Resource Alarms guide to learn more.
Example:
Displays the node certificates for every listener on target node that is configured to use TLS.
Example:
Health check that fails (returns with a non-zero code) if there are alarms in effect on any of the cluster nodes.
See RabbitMQ Resource Alarms guide to learn more.
Example:
Checks the expiration date on the certificates for every listener on target node that is configured to use TLS. Supported time units are:
Example:
Health check that fails (returns with a non-zero code) if there are alarms in effect on the target node.
See RabbitMQ Resource Alarms guide to learn more.
Example:
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 rabbitmq-diagnostics
The check only validates if a new TCP connection is accepted. It does not perform messaging protocol handshake or authenticate.
See RabbitMQ Networking guide to learn more.
Example:
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).
See RabbitMQ Networking guide to learn more.
Example:
Health check that fails (returns with a non-zero code) if the target node does not have a listener for the specified protocol.
See RabbitMQ Networking guide to learn more.
Example:
Health check that fails (returns with a non-zero code) if the RabbitMQ application is not running on the target node.
If rabbitmqctl(8) was used to stop the application, this check will fail.
Example:
Health check that checks if all vhosts are running in the target node
Example:
Lists cipher suites enabled by default. To list all available cipher suites, add the --all argument.
Example:
Displays target node's command-line arguments and flags as reported by the runtime.
Example:
Streams internal events from a running node. Output is jq-compatible.
Example:
Runs a peer discovery on the target node and prints the discovered nodes, if any.
See RabbitMQ Cluster Formation guide to learn more.
Example:
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.
See RabbitMQ Clustering guide to learn more.
Example:
Reports target node's Erlang/OTP version.
Example:
Reports if RabbitMQ application is currently booting (not booted/running or stopped) on the target node.
Example:
Reports if RabbitMQ application is fully booted and running (that is, not stopped) on the target node.
Example:
See list_bindings in rabbitmqctl(8)
See list_channels in rabbitmqctl(8)
See list_ciphers in rabbitmqctl(8)
See list_connections in rabbitmqctl(8)
See list_consumers in rabbitmqctl(8)
See list_exchanges in rabbitmqctl(8)
See list_hashes in rabbitmqctl(8)
See list_queues in rabbitmqctl(8)
See list_unresponsive_queues in rabbitmqctl(8)
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.
See RabbitMQ Networking guide to learn more.
Example:
Prints the last N lines of the log on the node
Example:
Streams logs from a running node for a period of time
Example:
Periodically samples stack traces of all Erlang processes ("lightweight threads") on the node. Reports the processes for which stack trace samples are identical.
Identical samples may indicate that the process is not making any progress but is not necessarily an indication of a problem.
Example:
Displays node's memory usage by category. Supported memory units are:
See RabbitMQ Memory Use guide to learn more.
Example:
Starts a CLI observer interface on the target node
Example:
Most basic health check. Succeeds if target node (runtime) is running and rabbitmq-diagnostics can authenticate with it successfully.
See report in rabbitmqctl(8)
Performs sampling of runtime (kernel) threads' activity for interval seconds and reports it.
For this command to work, Erlang/OTP on the target node must be compiled with microstate accounting support and have the runtime_tools package available.
Example:
See schema_info in rabbitmqctl(8)
Reports target node's version.
Example:
See status in rabbitmqctl(8)
Lists all TLS versions supported by the runtime on the target node. Note that RabbitMQ can be configured to only accept a subset of those versions, for example, SSLv3 is deactivated by default.
See RabbitMQ TLS guide to learn more.
Example:
See list_global_parameters in rabbitmqctl(8)
See list_parameters in rabbitmqctl(8)
See list_operator_policies in rabbitmqctl(8)
See list_policies in rabbitmqctl(8)
See list_vhost_limits in rabbitmqctl(8)
Shows log file location(s) on target node
Example:
See list_feature_flags in rabbitmqctl(8)
See quorum_status in rabbitmq-queues(8)
See check_if_node_is_mirror_sync_critical in rabbitmq-queues(8)
See check_if_node_is_quorum_critical in rabbitmq-queues(8)
rabbitmqctl(8), rabbitmq-server(8), rabbitmq-queues(8), rabbitmq-streams(8), rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5), rabbitmq-echopid(8)
The RabbitMQ Team <info@rabbitmq.com>
If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them using GitHub Discussions or our community Discord server.
If you'd like to contribute an improvement to the site, its source is available on GitHub. Simply fork the repository and submit a pull request. Thank you!