Skip to content

Commit 0df3fd5

Browse files
rabbitmqctl(8) WIP
1 parent 748b887 commit 0df3fd5

File tree

3 files changed

+185
-51
lines changed

3 files changed

+185
-51
lines changed

docs/rabbitmq-diagnostics.8

Lines changed: 156 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,14 @@ See the
4242
to learn more about RabbitMQ diagnostics, monitoring and health checks.
4343

4444
.Nm
45-
allows the operator to TODO.
45+
allows the operator to inspect node and cluster state. A number of
46+
health checks are available to be used interactively and by monitoring tools.
4647

4748
.Pp
48-
The
49-
.Cm enable ,
50-
.Cm disable ,
51-
and
52-
.Cm set
53-
commands will update the plugins file and then attempt to connect to the
54-
broker and ensure it is running all enabled plugins.
55-
By default if it is not possible to connect to the running broker (for
56-
example if it is stopped) the operation will fail.
57-
If
58-
.Nm
59-
is used on the same host as the target node,
60-
.Fl -offline
61-
can be specified to make
62-
.Nm
63-
resolve and update plugin state directly (without contacting the node).
64-
Such changes will only have an effect on next node start.
49+
By default if it is not possible to connect to and authenticate with the target node
50+
(for example if it is stopped), the operation will fail.
6551
To learn more, see the
66-
.Lk https://www.rabbitmq.com/plugins.html "RabbitMQ Plugins guide"
52+
.Lk https://www.rabbitmq.com/monitoring.html "RabbitMQ Monitoring guide"
6753
.
6854
.\" ------------------------------------------------------------------
6955
.Sh OPTIONS
@@ -115,4 +101,155 @@ To learn more, see the
115101
.El
116102
.\" ------------------------------------------------------------------
117103
.Sh COMMANDS
104+
.\" ------------------------------------
105+
.Ss Topology Introspection
106+
.Pp
107+
The topology introspection commands list topology entities (e.g. queues) with tab-delimited columns.
108+
.
109+
These commands and their arguments are delegated to rabbitmqctl(8).
110+
.Pp
111+
Some commands (
112+
.Cm list_queues ,
113+
.Cm list_exchanges ,
114+
.Cm list_bindings
115+
and
116+
.Cm list_consumers )
117+
accept an optional
118+
.Ar vhost
119+
parameter.
120+
.Pp
121+
The
122+
.Cm list_queues ,
123+
.Cm list_exchanges
124+
and
125+
.Cm list_bindings
126+
commands accept an optional virtual host parameter for which to display
127+
results.
128+
The default value is
129+
.Qq / .
130+
.Bl -tag -width Ds
131+
.\" ------------------------------------
132+
.It Cm list_queues Oo Fl p Ar vhost Oc Oo Fl -offline | Fl -online | Fl -local Oc Op Ar queueinfoitem ...
133+
See
134+
.Cm list_queues
135+
in
136+
.Xr rabbitmqctl 8
137+
.\" ------------------------------------
138+
.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ...
139+
See
140+
.Cm list_exchanges
141+
in
142+
.Xr rabbitmqctl 8
143+
.\" ------------------------------------
144+
.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ...
145+
See
146+
.Cm list_bindings
147+
in
148+
.Xr rabbitmqctl 8
149+
.\" ------------------------------------
150+
.It Cm list_connections Op Ar connectioninfoitem ...
151+
See
152+
.Cm list_connections
153+
in
154+
.Xr rabbitmqctl 8
155+
.\" ------------------------------------
156+
.It Cm list_channels Op Ar channelinfoitem ...
157+
See
158+
.Cm list_channels
159+
in
160+
.Xr rabbitmqctl 8
161+
.\" ------------------------------------
162+
.It Cm list_consumers Op Fl p Ar vhost
163+
See
164+
.Cm list_consumers
165+
in
166+
.Xr rabbitmqctl 8
167+
.\" ------------------------------------
168+
.It Cm status
169+
See
170+
.Cm status
171+
in
172+
.Xr rabbitmqctl 8
173+
.\" ------------------------------------
174+
.It Cm node_health_check
175+
Performs several health checks of the target node.
176+
.Pp
177+
Verifies the rabbit application is running and alarms are not set,
178+
then checks that every queue and channel on the node can emit basic stats.
179+
.Pp
180+
Example:
181+
.Sp
182+
.Dl rabbitmqctl node_health_check -n rabbit@hostname
183+
.\" ------------------------------------
184+
.It Cm environment
185+
See
186+
.Cm environment
187+
in
188+
.Xr rabbitmqctl 8
189+
.\" ------------------------------------
190+
.It Cm report
191+
See
192+
.Cm report
193+
in
194+
.Xr rabbitmqctl 8
195+
.\" ------------------------------------
196+
.It Cm list_global_parameters
197+
See
198+
.Cm list_global_parameters
199+
in
200+
.Xr rabbitmqctl 8
201+
.\" ------------------------------------
202+
.It Cm list_operator_policies Op Fl p Ar vhost
203+
See
204+
.Cm list_operator_policies
205+
in
206+
.Xr rabbitmqctl 8
207+
.\" ------------------------------------
208+
.It Cm list_parameters Op Fl p Ar vhost
209+
See
210+
.Cm list_parameters
211+
in
212+
.Xr rabbitmqctl 8
118213
.\" ------------------------------------------------------------------
214+
.It Cm list_permissions Op Fl p Ar vhost
215+
See
216+
.Cm list_permissions
217+
in
218+
.Xr rabbitmqctl 8
219+
.\" ------------------------------------
220+
.It Cm list_policies Op Fl p Ar vhost
221+
See
222+
.Cm list_policies
223+
in
224+
.Xr rabbitmqctl 8
225+
.\" ------------------------------------
226+
.It Cm list_topic_permissions Op Fl p Ar vhost
227+
See
228+
.Cm list_topic_permissions
229+
in
230+
.Xr rabbitmqctl 8
231+
.\" ------------------------------------
232+
.It Cm list_user_permissions Ar username
233+
See
234+
.Cm list_user_permissions
235+
in
236+
.Xr rabbitmqctl 8
237+
.\" ------------------------------------
238+
.It Cm list_user_topic_permissions Ar username
239+
See
240+
.Cm list_user_topic_permissions
241+
in
242+
.Xr rabbitmqctl 8
243+
.\" ------------------------------------
244+
.It Cm list_users
245+
See
246+
.Cm list_users
247+
in
248+
.Xr rabbitmqctl 8
249+
.\" ------------------------------------
250+
.It Cm list_vhosts Op Ar vhostinfoitem ...
251+
See
252+
.Cm list_vhosts
253+
in
254+
.Xr rabbitmqctl 8
255+
.\" ------------------------------------

docs/rabbitmq-plugins.8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ and
6363
.Cm set
6464
commands will update the plugins file and then attempt to connect to the
6565
broker and ensure it is running all enabled plugins.
66-
By default if it is not possible to connect to the running broker (for
67-
example if it is stopped) the operation will fail.
66+
By default if it is not possible to connect to and authenticate with the target node
67+
(for example if it is stopped), the operation will fail.
6868
If
6969
.Nm
7070
is used on the same host as the target node,

docs/rabbitmqctl.8

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -812,12 +812,12 @@ For example, this command instructs the RabbitMQ broker to grant the
812812
user named
813813
.Qq janeway
814814
access to the virtual host called
815-
.Qq /myvhost ,
815+
.Qq my-vhost ,
816816
with configure permissions on all resources whose names starts with
817817
.Qq janeway- ,
818818
and write and read permissions on all resources:
819819
.sp
820-
.Dl rabbitmqctl set_permissions -p /myvhost janeway Qo ^janeway-.* Qc Qo .* Qc Qq .*
820+
.Dl rabbitmqctl set_permissions -p my-vhost janeway Qo ^janeway-.* Qc Qo .* Qc Qq .*
821821
.\" ------------------------------------
822822
.It Cm clear_permissions Oo Fl p Ar vhost Oc Ar username
823823
.Bl -tag -width Ds
@@ -835,9 +835,9 @@ For example, this command instructs the RabbitMQ broker to deny the user
835835
named
836836
.Qq janeway
837837
access to the virtual host called
838-
.Qq /myvhost :
838+
.Qq my-vhost :
839839
.sp
840-
.Dl rabbitmqctl clear_permissions -p /myvhost janeway
840+
.Dl rabbitmqctl clear_permissions -p my-vhost janeway
841841
.\" ------------------------------------
842842
.It Cm list_permissions Op Fl p Ar vhost
843843
.Bl -tag -width Ds
@@ -852,12 +852,12 @@ Lists permissions in a virtual host.
852852
.Pp
853853
For example, this command instructs the RabbitMQ broker to list all the
854854
users which have been granted access to the virtual host called
855-
.Qq /myvhost ,
855+
.Qq my-vhost ,
856856
and the permissions they have for operations on resources in that
857857
virtual host.
858858
Note that an empty string means no permissions granted:
859859
.sp
860-
.Dl rabbitmqctl list_permissions -p /myvhost
860+
.Dl rabbitmqctl list_permissions -p my-vhost
861861
.\" ------------------------------------
862862
.It Cm list_user_permissions Ar username
863863
.Bl -tag -width Ds
@@ -899,18 +899,18 @@ user named
899899
publish and consume messages going through the
900900
.Qq amp.topic
901901
exchange of the
902-
.Qq /myvhost
902+
.Qq my-vhost
903903
virtual host with a routing key starting with
904904
.Qq janeway- :
905905
.sp
906-
.Dl rabbitmqctl set_topic_permissions -p /myvhost janeway amq.topic Qo ^janeway-.* Qc Qo ^janeway-.* Qc
906+
.Dl rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic Qo ^janeway-.* Qc Qo ^janeway-.* Qc
907907
.Pp
908908
Topic permissions support variable expansion for the following variables:
909909
username, vhost, and client_id. Note that client_id is expanded only when using MQTT.
910910
The previous example could be made more generic by using
911911
.Qq ^{username}-.* :
912912
.sp
913-
.Dl rabbitmqctl set_topic_permissions -p /myvhost janeway amq.topic Qo ^{username}-.* Qc Qo ^{username}-.* Qc
913+
.Dl rabbitmqctl set_topic_permissions -p my-vhost janeway amq.topic Qo ^{username}-.* Qc Qo ^{username}-.* Qc
914914
.\" ------------------------------------
915915
.It Cm clear_topic_permissions Oo Fl p Ar vhost Oc Ar username Oo Ar exchange Oc
916916
.Bl -tag -width Ds
@@ -933,9 +933,9 @@ named
933933
for the topic exchange
934934
.Qq amq.topic
935935
in the virtual host called
936-
.Qq /myvhost :
936+
.Qq my-vhost :
937937
.sp
938-
.Dl rabbitmqctl clear_topic_permissions -p /myvhost janeway amq.topic
938+
.Dl rabbitmqctl clear_topic_permissions -p my-vhost janeway amq.topic
939939
.\" ------------------------------------
940940
.It Cm list_topic_permissions Op Fl p Ar vhost
941941
.Bl -tag -width Ds
@@ -949,9 +949,9 @@ Lists topic permissions in a virtual host.
949949
.Pp
950950
For example, this command instructs the RabbitMQ broker to list all the
951951
users which have been granted topic permissions in the virtual host called
952-
.Qq /myvhost:
952+
.Qq my-vhost:
953953
.sp
954-
.Dl rabbitmqctl list_topic_permissions -p /myvhost
954+
.Dl rabbitmqctl list_topic_permissions -p my-vhost
955955
.\" ------------------------------------
956956
.It Cm list_user_topic_permissions Ar username
957957
.Bl -tag -width Ds
@@ -1230,10 +1230,9 @@ Suppresses the
12301230
parameter.
12311231
.El
12321232
.El
1233-
.Ss Server Status
1234-
The server status queries interrogate the server and return a list of
1235-
results with tab-delimited columns.
1236-
Some queries (
1233+
.Ss Topology Introspection
1234+
The topology introspection commands list topology entities (e.g. queues) with tab-delimited columns.
1235+
Some commands (
12371236
.Cm list_queues ,
12381237
.Cm list_exchanges ,
12391238
.Cm list_bindings
@@ -1242,8 +1241,6 @@ and
12421241
accept an optional
12431242
.Ar vhost
12441243
parameter.
1245-
This parameter, if present, must be specified immediately after the
1246-
query.
12471244
.Pp
12481245
The
12491246
.Cm list_queues ,
@@ -1399,9 +1396,9 @@ are specified then queue name and depth are displayed.
13991396
.Pp
14001397
For example, this command displays the depth and number of consumers for
14011398
each queue of the virtual host named
1402-
.Qq /myvhost
1399+
.Qq my-vhost
14031400
.sp
1404-
.Dl rabbitmqctl list_queues -p /myvhost messages consumers
1401+
.Dl rabbitmqctl list_queues -p my-vhost messages consumers
14051402
.\" ------------------------------------
14061403
.It Cm list_exchanges Oo Fl p Ar vhost Oc Op Ar exchangeinfoitem ...
14071404
Returns exchange details.
@@ -1455,9 +1452,9 @@ are specified then exchange name and type are displayed.
14551452
.Pp
14561453
For example, this command displays the name and type for each exchange
14571454
of the virtual host named
1458-
.Qq /myvhost :
1455+
.Qq my-vhost :
14591456
.sp
1460-
.Dl rabbitmqctl list_exchanges -p /myvhost name type
1457+
.Dl rabbitmqctl list_exchanges -p my-vhost name type
14611458
.\" ------------------------------------
14621459
.It Cm list_bindings Oo Fl p Ar vhost Oc Op Ar bindinginfoitem ...
14631460
Returns binding details.
@@ -1503,9 +1500,9 @@ are specified then all above items are displayed.
15031500
.Pp
15041501
For example, this command displays the exchange name and queue name of
15051502
the bindings in the virtual host named
1506-
.Qq /myvhost
1503+
.Qq my-vhost
15071504
.sp
1508-
.Dl rabbitmqctl list_bindings -p /myvhost exchange_name queue_name
1505+
.Dl rabbitmqctl list_bindings -p my-vhost exchange_name queue_name
15091506
.\" ------------------------------------
15101507
.It Cm list_connections Op Ar connectioninfoitem ...
15111508
Returns TCP/IP connection statistics.
@@ -1711,13 +1708,13 @@ broker:
17111708
.Dl rabbitmqctl status
17121709
.\" ------------------------------------
17131710
.It Cm node_health_check
1714-
Health check of the RabbitMQ node.
1715-
Verifies the rabbit application is running, list_queues and
1716-
list_channels return, and alarms are not set.
1711+
Performs several health checks of the target node.
17171712
.Pp
1718-
For example, this command performs a health check on the RabbitMQ node:
1713+
Verifies the rabbit application is running and alarms are not set,
1714+
then checks that every queue and channel on the node can emit basic stats.
17191715
.sp
1720-
.Dl rabbitmqctl node_health_check -n rabbit@stringer
1716+
Example:
1717+
.Dl rabbitmqctl node_health_check -n rabbit@hostname
17211718
.\" ------------------------------------
17221719
.It Cm environment
17231720
Displays the name and value of each variable in the application

0 commit comments

Comments
 (0)