1RABBITMQ-DIAGNOSTICS(8)   BSD System Manager's Manual  RABBITMQ-DIAGNOSTICS(8)
2

NAME

4     rabbitmq-diagnostics — RabbitMQ diagnostics, monitoring and health checks
5     tools
6

SYNOPSIS

8     rabbitmq-diagnostics [-q] [-s] [-l] [-n node] [-t timeout] command
9                          [command_options]
10

DESCRIPTION

12     rabbitmq-diagnostics is a command line tool that provides commands used
13     for diagnostics, monitoring and health checks of RabbitMQ nodes.  See the
14     RabbitMQ documentation guides: https://rabbitmq.com/documentation.html to
15     learn more about RabbitMQ diagnostics, monitoring and health checks.
16
17     rabbitmq-diagnostics allows the operator to inspect node and cluster
18     state. A number of health checks are available to be used interactively
19     and by monitoring tools.
20
21
22     By default if it is not possible to connect to and authenticate with the
23     target node (for example if it is stopped), the operation will fail.  To
24     learn more, see the RabbitMQ Monitoring guide:
25     https://rabbitmq.com/monitoring.html
26

OPTIONS

28     -n node
29             Default node is "rabbit@target-hostname", where target-hostname
30             is the local host.  On a host named "myserver.example.com", the
31             node name will usually be "rabbit@myserver" (unless
32             RABBITMQ_NODENAME has been overridden).  The output of "hostname
33             -s" is usually the correct suffix to use after the "@" sign.  See
34             rabbitmq-server(8) for details of configuring a RabbitMQ node.
35
36     -q, --quiet
37             Quiet output mode is selected.  Informational messages are re‐
38             duced when quiet mode is in effect.
39
40     -s, --silent
41             Silent output mode is selected.  Informational messages are re‐
42             duced and table headers are suppressed when silent mode is in ef‐
43             fect.
44
45     -t timeout, --timeout timeout
46             Operation timeout in seconds.  Not all commands support timeouts.
47             Default is infinity.
48
49     -l, --longnames
50             Must be specified when the cluster is configured to use long
51             (FQDN) node names.  To learn more, see the RabbitMQ Clustering
52             guide: https://rabbitmq.com/clustering.html
53
54     --erlang-cookie cookie
55             Shared secret to use to authenticate to the target node.  Prefer
56             using a local file or the RABBITMQ_ERLANG_COOKIE environment
57             variable instead of specifying this option on the command line.
58             To learn more, see the RabbitMQ CLI Tools guide:
59             https://rabbitmq.com/cli.html
60

COMMANDS

62     Most commands provided by rabbitmq-diagnostics inspect node and cluster
63     state or perform health checks.
64
65     Commands that list topology entities (e.g. queues) use tab as column de‐
66     limiter.  These commands and their arguments are delegated to rabbit‐
67     mqctl(8).
68
69     Some commands ( list_queues, list_exchanges, list_bindings and
70     list_consumers) accept an optional vhost parameter.
71
72     The list_queues, list_exchanges and list_bindings commands accept an op‐
73     tional virtual host parameter for which to display results.  The default
74     value is "/".
75
76 Help
77   help [-l] [command_name]
78
79           Prints usage for all available commands.
80
81           -l, --list-commands
82                   List command usages only, without parameter explanation.
83
84           command_name
85                   Prints usage for the specified command.
86
87   version
88
89           Displays CLI tools version
90
91 Nodes
92   wait
93
94           See wait in rabbitmqctl(8)
95
96 Cluster
97   cluster_status
98
99           See cluster_status in rabbitmqctl(8)
100
101 Users
102   list_users
103
104           See list_users in rabbitmqctl(8)
105
106 Access Control
107   list_permissions [-p vhost]
108
109           See list_permissions in rabbitmqctl(8)
110
111   list_topic_permissions [-p vhost]
112
113           See list_topic_permissions in rabbitmqctl(8)
114
115   list_user_permissions username
116
117           See list_user_permissions in rabbitmqctl(8)
118
119   list_user_topic_permissions username
120
121           See list_user_topic_permissions in rabbitmqctl(8)
122
123   list_vhosts [vhostinfoitem ...]
124
125           See list_vhosts in rabbitmqctl(8)
126
127 Monitoring, observability and health checks
128   alarms
129
130           Lists resource alarms, if any, in the cluster.
131
132           See RabbitMQ Resource Alarms guide:
133           https://rabbitmq.com/alarms.html to learn more.
134
135           Example:
136                 rabbitmq-diagnostics alarms
137
138   certificates
139
140           Displays the node certificates for every listener on target node
141           that is configured to use TLS.
142
143           Example:
144
145                 rabbitmq-diagnostics certificates
146
147   check_alarms
148
149           Health check that fails (returns with a non-zero code) if there are
150           alarms in effect on any of the cluster nodes.
151
152           See RabbitMQ Resource Alarms guide:
153           https://rabbitmq.com/alarms.html to learn more.
154
155           Example:
156                 rabbitmq-diagnostics check_alarms
157
158   check_certificate_expiration [--unit time_unit] [--within seconds]
159
160           Checks the expiration date on the certificates for every listener
161           on target node that is configured to use TLS.  Supported time units
162           are:
163
164           days
165
166           weeks
167
168           months
169
170           years
171
172           Example:
173                 rabbitmq-diagnostics check_certificate_expiration --unit
174                 weeks --within 6
175
176   check_local_alarms
177
178           Health check that fails (returns with a non-zero code) if there are
179           alarms in effect on the target node.
180
181           See RabbitMQ Resource Alarms guide:
182           https://rabbitmq.com/alarms.html to learn more.
183
184           Example:
185                 rabbitmq-diagnostics check_local_alarms
186
187   check_port_connectivity
188
189           Health check that fails (returns with a non-zero code) if any lis‐
190           tener ports on the target node cannot accept a new TCP connection
191           opened by rabbitmq-diagnostics
192
193           The check only validates if a new TCP connection is accepted. It
194           does not perform messaging protocol handshake or authenticate.
195
196           See RabbitMQ Networking guide: https://rabbitmq.com/networking.html
197           to learn more.
198
199           Example:
200                 rabbitmq-diagnostics check_port_connectivity
201
202   check_port_listener port
203
204           Health check that fails (returns with a non-zero code) if the tar‐
205           get node is not listening on the specified port (there is no lis‐
206           tener that uses that port).
207
208           See RabbitMQ Networking guide: https://rabbitmq.com/networking.html
209           to learn more.
210
211           Example:
212                 rabbitmq-diagnostics check_port_listener 5672
213
214   check_protocol_listener protocol
215
216           Health check that fails (returns with a non-zero code) if the tar‐
217           get node does not have a listener for the specified protocol.
218
219           See RabbitMQ Networking guide: https://rabbitmq.com/networking.html
220           to learn more.
221
222           Example:
223                 rabbitmq-diagnostics check_protocol_listener mqtt
224
225   check_running
226
227           Health check that fails (returns with a non-zero code) if the Rab‐
228           bitMQ application is not running on the target node.
229
230           If rabbitmqctl(8) was used to stop the application, this check will
231           fail.
232
233           Example:
234                 rabbitmq-diagnostics check_running
235
236   check_virtual_hosts
237
238           Health check that checks if all vhosts are running in the target
239           node
240
241           Example:
242                 rabbitmq-diagnostics check_virtual_hosts --timeout 60
243
244   cipher_suites
245
246           Lists cipher suites enabled by default. To list all available ci‐
247           pher suites, add the --all argument.
248
249           Example:
250                 rabbitmq-diagnostics cipher_suites --format openssl --all
251
252   command_line_arguments
253
254           Displays target node's command-line arguments and flags as reported
255           by the runtime.
256
257           Example:
258                 rabbitmq-diagnostics command_line_arguments -n
259                 rabbit@hostname
260
261   consume_event_stream [--duration seconds | -d seconds] [--pattern pattern]
262           [--timeout milliseconds]
263
264           Streams internal events from a running node. Output is jq-compati‐
265           ble.
266
267           Example:
268                 rabbitmq-diagnostics consume_event_stream -n rabbit@hostname
269                 --duration 20 --pattern queue_.*
270
271   discover_peers
272
273           Runs a peer discovery on the target node and prints the discovered
274           nodes, if any.
275
276           See RabbitMQ Cluster Formation guide: https://rabbitmq.com/cluster-
277           formation.html to learn more.
278
279           Example:
280                 rabbitmq-diagnostics discover_peers --timeout 60
281
282   environment
283           See environment in rabbitmqctl(8)
284
285   erlang_cookie_hash
286
287           Outputs a hashed value of the shared secret used by the target node
288           to authenticate CLI tools and peers. The value can be compared with
289           the hash found in error messages of CLI tools.
290
291           See RabbitMQ Clustering guide:
292           https://rabbitmq.com/clustering.html#erlang-cookie to learn more.
293
294           Example:
295                 rabbitmq-diagnostics erlang_cookie_hash -q
296
297   erlang_version
298
299           Reports target node's Erlang/OTP version.
300
301           Example:
302                 rabbitmq-diagnostics erlang_version -q
303
304   is_booting
305
306           Reports if RabbitMQ application is currently booting (not
307           booted/running or stopped) on the target node.
308
309           Example:
310                 rabbitmq-diagnostics is_booting
311
312   is_running
313
314           Reports if RabbitMQ application is fully booted and running (that
315           is, not stopped) on the target node.
316
317           Example:
318                 rabbitmq-diagnostics is_running
319
320   list_bindings [-p vhost] [bindinginfoitem ...]
321
322           See list_bindings in rabbitmqctl(8)
323
324   list_channels [channelinfoitem ...]
325
326           See list_channels in rabbitmqctl(8)
327
328   list_ciphers
329
330           See list_ciphers in rabbitmqctl(8)
331
332   list_connections [connectioninfoitem ...]
333
334           See list_connections in rabbitmqctl(8)
335
336   list_consumers [-p vhost]
337
338           See list_consumers in rabbitmqctl(8)
339
340   list_exchanges [-p vhost] [exchangeinfoitem ...]
341
342           See list_exchanges in rabbitmqctl(8)
343
344   list_hashes
345
346           See list_hashes in rabbitmqctl(8)
347
348   list_queues [-p vhost] [--offline | --online | --local] [queueinfoitem ...]
349
350           See list_queues in rabbitmqctl(8)
351           ] [--local] [--queue-timeout milliseconds] [column ...]
352           [--no-table-headers]
353
354   list_unresponsive_queues
355
356           See list_unresponsive_queues in rabbitmqctl(8)
357
358   listeners
359
360           Lists listeners (bound sockets) on this node. Use this to inspect
361           what protocols and ports the node is listening on for client, CLI
362           tool and peer connections.
363
364           See RabbitMQ Networking guide: https://rabbitmq.com/networking.html
365           to learn more.
366
367           Example:
368                 rabbitmq-diagnostics listeners
369
370   log_tail --number number | -N number [--timeout milliseconds]
371
372           Prints the last N lines of the log on the node
373
374           Example:
375                 rabbitmq-diagnostics log_tail -number 100
376
377   log_tail_stream [--duration seconds | -d seconds] [--timeout milliseconds]
378
379           Streams logs from a running node for a period of time
380
381           Example:
382                 rabbitmq-diagnostics log_tail_stream --duration 60
383
384   maybe_stuck
385
386           Periodically samples stack traces of all Erlang processes ("light‐
387           weight threads") on the node. Reports the processes for which stack
388           trace samples are identical.
389
390           Identical samples may indicate that the process is not making any
391           progress but is not necessarily an indication of a problem.
392
393           Example:
394                 rabbitmq-diagnostics maybe_stuck -q
395
396   memory_breakdown [--unit memory_unit]
397
398           Displays node's memory usage by category.  Supported memory units
399           are:
400
401           bytes
402
403           megabytes
404
405           gigabytes
406
407           terabytes
408
409           See RabbitMQ Memory Use guide: https://rabbitmq.com/memory-use.html
410           to learn more.
411
412           Example:
413
414                 rabbitmq-diagnostics memory_breakdown --unit gigabytes
415
416   observer [--interval seconds]
417
418           Starts a CLI observer interface on the target node
419
420           Example:
421                 rabbitmq-diagnostics observer --interval 10
422
423   ping
424
425           Most basic health check. Succeeds if target node (runtime) is run‐
426           ning and rabbitmq-diagnostics can authenticate with it success‐
427           fully.
428
429   report
430
431           See report in rabbitmqctl(8)
432
433   runtime_thread_stats [--sample-interval interval]
434
435           Performs sampling of runtime (kernel) threads' activity for
436           interval seconds and reports it.
437
438           For this command to work, Erlang/OTP on the target node must be
439           compiled with microstate accounting support and have the run‐
440           time_tools package available.
441
442           Example:
443                 rabbitmq-diagnostics runtime_thread_stats --sample-interval
444                 15
445
446   schema_info [--no_table_headers] [column ...] [--timeout milliseconds]
447
448           See schema_info in rabbitmqctl(8)
449
450   server_version
451
452           Reports target node's version.
453
454           Example:
455                 rabbitmq-diagnostics server_version -q
456
457   status
458
459           See status in rabbitmqctl(8)
460
461   tls_versions
462
463           Lists all TLS versions supported by the runtime on the target node.
464           Note that RabbitMQ can be configured to only accept a subset of
465           those versions, for example, SSLv3 is disabled by default.
466
467           See RabbitMQ TLS guide: https://rabbitmq.com/ssl.html to learn
468           more.
469
470           Example:
471                 rabbitmq-diagnostics tls_versions -q
472
473 Parameters
474   list_global_parameters
475
476           See list_global_parameters in rabbitmqctl(8)
477
478   list_parameters [-p vhost]
479
480           See list_parameters in rabbitmqctl(8)
481
482 Policies
483   list_operator_policies [-p vhost]
484
485           See list_operator_policies in rabbitmqctl(8)
486
487   list_policies [-p vhost]
488
489           See list_policies in rabbitmqctl(8)
490
491 Virtual hosts
492   list_vhost_limits [--vhost vhost] [--global] [--no-table-headers]
493
494           See list_vhost_limits in rabbitmqctl(8)
495
496 Node configuration
497   log_location [--all | -a] [--timeout milliseconds]
498
499           Shows log file location(s) on target node
500
501           Example:
502                 rabbitmq-diagnostics log_location -a
503
504 Feature flags
505   list_feature_flags [column ...] [--timeout milliseconds]
506
507           See list_feature_flags in rabbitmqctl(8)
508
509 Queues
510   quorum_status queue [--vhost vhost]
511
512           See quorum_status in rabbitmq-queues(8)
513
514   check_if_node_is_mirror_sync_critical
515
516           See check_if_node_is_mirror_sync_critical in rabbitmq-queues(8)
517
518   check_if_node_is_quorum_critical
519
520           See check_if_node_is_quorum_critical in rabbitmq-queues(8)
521

SEE ALSO

523     rabbitmqctl(8), rabbitmq-server(8), rabbitmq-queues(8),
524     rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5),
525     rabbitmq-echopid(8)
526

AUTHOR

528     The RabbitMQ Team <info@rabbitmq.com>
529
530RabbitMQ Server                  June 19, 2021                 RabbitMQ Server
Impressum