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:
15           https://rabbitmq.com/documentation.html
16     to learn more about RabbitMQ diagnostics, monitoring and health checks.
17
18     rabbitmq-diagnostics allows the operator to inspect node and cluster
19     state. A number of health checks are available to be used interactively
20     and by monitoring tools.
21
22
23     By default if it is not possible to connect to and authenticate with the
24     target node (for example if it is stopped), the operation will fail.  To
25     learn more, see the RabbitMQ Monitoring guide:
26           https://rabbitmq.com/monitoring.html
27

OPTIONS

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

COMMANDS

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

SEE ALSO

528     rabbitmqctl(8), rabbitmq-server(8), rabbitmq-queues(8),
529     rabbitmq-upgrade(8), rabbitmq-service(8), rabbitmq-env.conf(5),
530     rabbitmq-echopid(8)
531

AUTHOR

533     The RabbitMQ Team <info@rabbitmq.com>
534
535RabbitMQ Server               September 28, 2019               RabbitMQ Server
Impressum