RabbitMQ Management Plugin
RabbitMQ comes with a console that may be of help to you when debugging.
Go to http://
Log in using the following credentials:
Username: prismguest
Password: prismguest
Sample Overview page:
Refer to the following table for a description of the tabs on the RabbitMQ Console:
Tab | Description |
---|---|
Overview | This tab enables you to see how message processing is progressing over time. The data is displayed in a line chart format. One line chart shows queued messages (Ready, Unacknowledged, Total). Another line chart shows message rates (Publish, Deliver, Acknowledge, Deliver - no ack). |
Connections | This tab shows connections. You can filter the list. Click the HTTP API or Command Line links to display information about using the API. |
Exchanges | Select an Exchange in the Name column to view details for the Exchange. The displayed info includes Message rate in and Message rate out |
Queues | View messages and message rates . Messages: Ready, unacknowledged, total Message rates: (messages per second) Incoming, deliver(get), ack |
RabbitMQ Log Files
Prism uses RabbitMQ messaging service for data replication. RabbitMQ logs can provide valuable information for troubleshooting, especially issues related to replication.
RabbitMQ Log Management Best Practice for Prism
Change your RabbitMQ log level. Changing the log level will save hard drive space, reduce administration tasks and make it easier to search logs for errors. These log level settings are recommended by the Retail Pro Professional Services Team. You can find additional information about configuring RabbitMQ logs on the RabbitMQ website and on GitHub. The default log level in RabbitMQ is Info which is one severity below debug. When logging is set to the Info level, log entries will be recorded for events in the Info level and below, which includes Info, Warning, Error and Critical. This means that by default, only debug-level events are excluded from the logs. This is quite a lot of detail to include in the logs and is typically not necessary in a production environment. Instead, change the RabbitMQ log level to Error at each installation.
To edit the RabbitMQ log level:
Navigate to the C:\ProgramData\RetailPro\Server\RabbitMQ directory. Edit the file and change the contents to reflect the text in the log file below.
[{lager, [
{handlers, [
{lager_file_backend, [(file, "error.log"),
{level, error},
{date, "$00"},
{size, 10485760},
{count, 10}]}
]}]}]
Refer to the following table for an explanation of the configuration file contents:
Line entry in rabbitmq.config | Description |
---|---|
{file, "error.log"}, {level, error} | Tells lager to log errors and above messages to error.log |
{size, 10485760}, {date, "$00"} | Tells lager to rotate the file at midnight or when it reaches 10mb, whichever comes first |
{count, 10} | Tells lager to keep 10 rotated logs in addition to the current one. Setting the count to zero does not disable rotation. Instead, it rotates the file and keeps no previous versions. |
{size, 0}, {date, " "} | To disable rotation, set size to zero and the date to " " |
"$D0" (D-zero) Syntax
The $D0 syntax is taken from the syntax newsyslog uses in newsyslog.conf. The relevant extract follows.
Day, week, month and time format
The lead-in character for day, week and month specification is a '$' sign. The format of the day, week and month specification is: [Dhh], [Ww[Dhh]] and [Mdd[Dhh]], respectively. Hour specification is added on top of this, displayed as [Hmm]. Optional time fields default to midnight.
Range | Specification |
---|---|
w | Day of week Range 0 ... 6, 0 = Sunday |
dd | Day of month Range: 1 ... 31, or the letter L or l to specify the last day of the month |
hh | Hours Range: 0 ... 23 |
mm | Minutes Range: 0 ... 59 |
Examples
"$D0" Characters | Meaning |
---|---|
$D0 | Rotate every night at midnight |
$D23 | Rotate every day at 23:00 hr |
$W0D23 | Rotate every week on Sunday at 23:00 hr |
$W5D16 | Rotate every week on Friday at 16:00 hr |
$M1D0 | Rotate on the first day of every month at midnight (i.e., the start of the day) |
$M5D6 | Rotate on every 5th day of the month at 6:00 hr |
$H00 | Rotate every hour at HH:00 |
$D12H30 | Rotate every day at 12:30 |
$W0D0H0 | Rotate every week on Sunday at 00:00 |