Commit Graph

23 Commits

Author SHA1 Message Date
Alexey Lebedeff 398f072a03 Expose effective policy definition via CLI
Now it's only visible in the management UI.

One can craft a series of calls to `rabbitmqctl list_queues` and
`rabbitmqctl list_policies` to achieve similiar result. But it's more
difficult, and also doesn't take operator policy (if any) into account.
2022-12-02 17:06:17 +01:00
Michael Klishin 8c305a0770
rabbitmqctl(8) wording 2022-11-13 12:25:26 +04:00
Alex Valiushko d70660dac7 Add inclusive aliases to ctl info keys
Includes generic ability to provide aliases in other commands.
2022-11-11 14:44:05 -08:00
Michael Klishin ba9b4c143c
Apply rabbitmq/rabbitmq-website#1508 at the source (man pages) 2022-10-26 15:39:06 +04:00
Alex Valiushko 2e7692da5b fix docs for rabbitmqctl restart_vhost 2022-10-05 20:22:22 -07:00
Arnaud Cogoluègnes ed8c9f9298
Add links to rabbitmq-streams man page 2022-09-22 12:00:48 +02:00
Michael Klishin 4faec42412
rabbitmqctl(8): correct add_vhost option dashes 2022-08-02 14:50:48 +04:00
Michael Klishin abc1dcc5e6
rabbitmqctl(8): document optional args supported by add_vhost 2022-08-02 14:46:53 +04:00
Iliia Khaprov - VMware 6aff83c834
Follow-up for #5399. Add new vhost information items to the list 2022-08-02 10:35:55 +02:00
Jean-Sébastien Pédron 4dd07e2905
rabbitmqctl.8: Use `stream_queue` in the `enable_feature_flag` example
The `quorum_queue` feature flag is now required and is always enabled.
2022-08-01 12:31:44 +02:00
Péter Gömöri 542ffeebb5 Clarify documented/allowed log_level arg of rabbitmqctl set_log_level
The `critical` log level is already documented on the website/logging section.
2022-05-11 19:22:28 +02:00
Michael Klishin 9fb1ca140d
Add clear_user_limits to rabbitmqctl(8) 2022-04-28 23:52:54 +04:00
Michael Klishin 363bf649ff
Correct a typo 2022-04-28 22:20:53 +04:00
Michael Klishin e58679153d
Add set_user_limits to rabbitmqctl(8) 2022-04-28 22:11:59 +04:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Michael Klishin f7d32d69f8 Introduce a new CLI tool (scope), rabbitmq-tanzu
For Tanzu (commercial) plugins to attach their commands to instead of
polluting rabbitmqctl.

Pair: @pjk25
(cherry picked from commit 6e0f2436fa)
2021-11-30 14:54:09 +00:00
Michael Klishin 133e0ab72d
Manually apply rabbitmq/rabbitmq-website#1241 by @lushndm 2021-08-11 13:34:27 +03:00
Michael Klishin 5f8f57dac6
Drop a few exclusive terms still present in man pages
References #3159
2021-07-02 14:12:43 +03:00
Michael Klishin 8ec3b08462
More man page massaging 2021-06-19 19:27:53 +08:00
Michael Klishin 0b716aee3b
Minor man page updates post rabbitmq/rabbitmq-website#1209 2021-06-18 08:47:13 +08:00
Michael Klishin 0572156d74
Update a rabbitmqctl(8) example
As suggested in rabbitmq/rabbitmq-website#1209 by @jaisea
2021-06-15 14:52:18 +08:00
Jean-Sébastien Pédron cdcf602749
Switch from Lager to the new Erlang Logger API for logging
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.

The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.

The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.

The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:

    2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Licensed under the MPL 2.0. Website: https://rabbitmq.com

The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).

JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:

    Mar  3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}

For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
  * `-` still means stdout
  * `-stderr` means stderr
  * `syslog:` means syslog on localhost
  * `exchange:` means logging to `amq.rabbitmq.log`

`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.

The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.

From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.

In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):

    ?LOG_NOTICE("Logging: switching to configured handler(s); following "
                "messages may not be visible in this log output",
                #{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),

Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.

At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.

The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-03-11 15:17:36 +01:00
Philip Kuryloski a1fe3ab061 Change repo "root" to deps/rabbit
rabbit must not be the monorepo root application, as other applications depend on it
2020-11-13 14:34:42 +01:00