Commit Graph

24 Commits

Author SHA1 Message Date
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
Fushan Wen 23d5073dcb Add systemd hardening parameters in rabbitmq-server.service.example
systemd offers various options to harden services. To see details please
visit https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
2021-11-19 19:06:21 +08:00
Michael Klishin 133e0ab72d
Manually apply rabbitmq/rabbitmq-website#1241 by @lushndm 2021-08-11 13:34:27 +03:00
Michael Klishin c12544f545
Update rabbitmq.conf.example header
mostly to test Mergify integration with @pjk25.
2021-08-03 13:19:52 +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
Michael Klishin 8c03f51972
Revert "Merge pull request #3090 from johanrhodin/patch-1"
This reverts commit 0f94046b37, reversing
changes made to 37f5744833.

The value would be rejected by rabbitmq.conf schema validation.
It can be set to `undefined` via `rabbit.consumer_timeout` in
`advanced.config`.
2021-06-11 03:58:52 +03:00
Johan Rhodin ec23d34b48
Update rabbitmq.conf.example 2021-06-09 14:55:42 -05:00
kjnilsson 2ab05b8ff5 Set a default for consumer_timeout
So that faulty consumers that will never ack a pending messages have
their channels closed after 15 minutes.
2021-04-21 09:58:41 +01:00
Michael Klishin 2eac4debbf
rabbitmq.conf.example: mention pause_minority 2021-03-25 22:10:11 +03: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
Michael Klishin 1f0475120d
Update heartbeat timeout docs in rabbitmq.conf.example
Per suggestion from @adamhooper in #2852
2021-02-26 20:11:31 +03:00
Michael Klishin d52f8da763
Correct TLS settings not compatible with TLSv1.3 2021-02-14 01:35:08 +03:00
Michael Klishin 6d4c005731
rabbitmq.conf.example: clarify TLS settings incompatible with TLSv1.3 2021-02-14 01:08:24 +03:00
Michael Klishin 36262814fe
Document TLSv1.3-specific cipher suites in rabbitmq.conf.example 2021-02-14 00:01:23 +03:00
Michael Klishin 0e4436ff37
More TLS-related edits in rabbitmq.conf.example 2021-02-13 23:25:12 +03:00
Gabriele Santomaggio 68120f3467 fix space 2021-02-13 14:14:48 +01:00
Gabriele Santomaggio 1ac2e22f54 Add tls info 2021-02-13 14:12:32 +01:00
Gabriele Santomaggio b6635ab52e Add tls info 2021-02-13 14:09:30 +01:00
Michal Kuratczyk 6a81589c11 Expose `bypass_pem_cache` through rabbitmq.conf
Bypassing PEM cache may speed up TLS handshakes in some cases as described
here:
https://blog.heroku.com/how-we-sped-up-sni-tls-handshakes-by-5x
2020-12-17 16:53:14 +01:00
Michael Klishin 8abe0c4328
rabbitmq-upgrade(8): add missing commands
References rabbitmq/rabbitmq-website#1109
2020-12-13 20:58:15 +03: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