Giter Site home page Giter Site logo

rabbitmq / rabbitmq-management Goto Github PK

View Code? Open in Web Editor NEW
368.0 55.0 166.0 9.07 MB

RabbitMQ Management UI and HTTP API

Home Page: https://www.rabbitmq.com/management.html

License: Other

Makefile 1.29% Python 2.81% Erlang 48.89% HTML 15.01% CSS 1.07% JavaScript 29.64% Shell 0.07% Vim Snippet 1.22%
rabbitmq management monitoring http rabbitmq-plugin

rabbitmq-management's Introduction

This repository has been moved to the main unified RabbitMQ "monorepo", including all open issues. You can find the source under /deps/rabbitmq_management. All issues have been transferred.

Overview

Test Erlang 22.3 Test Erlang 23

RabbitMQ Management Plugin

This plugin provides a management UI and HTTP API for RabbitMQ.

Installation

This plugin is included in the RabbitMQ distribution. Like all plugins, it has to be enabled before it can be used.

Documentation

Copyright

(c) 2007-2020 VMware, Inc. or its affiliates.

rabbitmq-management's People

Contributors

acogoluegnes avatar anup5512 avatar asgs avatar ayanda-d avatar barryib avatar binarin avatar carlhoerberg avatar coderanger avatar dcorbacho avatar dparkinson avatar dpw avatar dumbbell avatar essen avatar gerhard avatar gotthardp avatar hairyhum avatar johanrhodin avatar jsoref avatar kjnilsson avatar lukaswoj avatar lukebakken avatar michaelklishin avatar pjk25 avatar rade avatar reepong avatar spring-operator avatar tkren avatar velimir avatar videlalvaro avatar wishdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rabbitmq-management's Issues

rabbitmqadmin errors when $HOME / $USERPROFILE isn't defined

There doesn't seem to be any checking for the existence of $HOME or $USERPROFILE in line 309 of rabbitmqadmin. line 310 produces an error when $HOME isn't set on ubuntu 12.04.

This was encountered by using puppet to run the admin tool, vs running from a login shell.

This was introduced in v 3.2.0, as it wasn't an issue in 3.1.5. (I downloaded v 3.1.5 of the tool and it worked fine.)

Error was:

Execution of '/usr/local/bin/rabbitmqadmin list exchanges' returned 1: Traceback (most recent call last):
File "/usr/local/bin/rabbitmqadmin", line 939, in
main()
File "/usr/local/bin/rabbitmqadmin", line 370, in main
(options, args) = make_configuration()
File "/usr/local/bin/rabbitmqadmin", line 319, in make_configuration
config_file = default_config()
File "/usr/local/bin/rabbitmqadmin", line 310, in default_config
return home + os.sep + ".rabbitmqadmin.conf"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

/api/queues/vhost/name/get with Accept Header returns 406 response

Making a request to the GET endpoint of a queue, when specifying an accept header not text/html returns a 406 response.

POST /api/queues/%2F/myqueue/get HTTP/1.1
Content-type: application/json
host: localhost:15672
authorization: Basic Z3Vlc3Q6Z3Vlc3Q=
accept: application/json
content-length: 44
Connection: close

{"count":1,"requeue":true,"encoding":"auto"}

leads to

HTTP/1.1 406 Not Acceptable
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
Date: Wed, 24 Jun 2015 02:36:57 GMT
Content-Type: application/json
Content-Length: 58

{"error":"Not Acceptable","reason":"\"Not Acceptable\"\n"}

running on 3.5.3

{"management_version":"3.5.3","rates_mode":"basic","exchange_types":[{"name":"topic","description":"AMQP topic exchange, as per the AMQP specification","enabled":true},{"name":"fanout","description":"AMQP fanout exchange, as per the AMQP specification","enabled":true},{"name":"direct","description":"AMQP direct exchange, as per the AMQP specification","enabled":true},{"name":"headers","description":"AMQP headers exchange, as per the AMQP specification","enabled":true}],"rabbitmq_version":"3.5.3","cluster_name":"rabbit@Owens-MacBook-Pro","erlang_version":"17.5","erlang_full_version":"Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:8:8] [async-threads:30] [hipe] [kernel-poll:true]","message_stats":{"publish":2,"publish_details":{"rate":0.0},"deliver_get":1,"deliver_get_details":{"rate":0.0},"get":1,"get_details":{"rate":0.0}},"queue_totals":{"messages":0,"messages_details":{"rate":0.0},"messages_ready":0,"messages_ready_details":{"rate":0.0},"messages_unacknowledged":0,"messages_unacknowledged_details":{"rate":0.0}},"object_totals":{"consumers":0,"queues":0,"exchanges":8,"connections":2,"channels":2},"statistics_db_event_queue":0,"node":"rabbit@localhost","statistics_db_node":"rabbit@localhost","listeners":[{"node":"rabbit@localhost","protocol":"amqp","ip_address":"127.0.0.1","port":5672},{"node":"rabbit@localhost","protocol":"clustering","ip_address":"::","port":25672},{"node":"rabbit@localhost","protocol":"mqtt","ip_address":"::","port":1883},{"node":"rabbit@localhost","protocol":"stomp","ip_address":"::","port":61613}],"contexts":[{"node":"rabbit@localhost","description":"RabbitMQ Management","path":"/","port":"15672"}]}

specifying an accept header of text/html returns the expected JSON response

Missing historical charts data

We are using RabbitMQ 3.5.3, Erlang 17.5 on Windows 2012R2.

Historical charts for the same queue are showing different numbers:

At 12:13 it says it were 27k messages at 10:00 http://content.screencast.com/users/timramone/folders/Jing/media/9f717015-502f-42bc-8841-17f83b1a71af/2015-10-23_1213.png

But at 14:26 it says there were 50k messages at 10:00
http://content.screencast.com/users/timramone/folders/Jing/media/d7a6e48e-4ddc-4de4-8ef6-e689083ac45b/2015-10-23_1426.png

It seems that queue graphs are showing data only for last hour. Message rates are also showing only last hour http://screencast.com/t/NkmdtVFh2i

Connections and channel tabs in the UI should respect active vhost

When viewing the Connections and Channels the Virtual host filter does not filter the connections/channels to the selected virtual host. On closer inspection it looks like the API request does not add the select virtual host as seen in Exchanges and Queues views.

Example Queue request filtering by virtual host call 'vhost1': http://localhost:15672/api/queues/vhost1
Example Connection request filtering by virtual host call 'vhost1': http://localhost:15672/api/connections -> missing vhost1.

Might need to add these API calls as well:
/api/channels/{vhost}
/api/connections/{vhost}
as manually calling gives an "Object not found response".

Node fails to start after network split

The reason is that rabbit_mgmt_db is already running on some other node in the cluster.
As stated in https://github.com/rabbitmq/rabbitmq-management/blob/master/src/rabbit_mgmt_sup_sup.erl#L19 , death of rabbit_mgmt_db due to this reason should not be fatal. For this reason rabbit_mgmt_sup is started as a temporary child. But temporary doesn't affect (synchronous) supervisor startup process, which results in non-starting node with following message:

   {could_not_start,rabbitmq_management,
       {{shutdown,
            {failed_to_start_child,rabbit_mgmt_sup,
                {'EXIT',
                    {{shutdown,
                         [{{already_started,<5613.920.0>},
                           {child,undefined,rabbit_mgmt_db,
                               {rabbit_mgmt_db,start_link,[]},
                               permanent,4294967295,worker,
                               [rabbit_mgmt_db]}}]},
                     {gen_server2,call,
                         [<5200.1647.0>,{init,<5200.1645.0>},infinity]}}}}},
        {rabbit_mgmt_app,start,[normal,[]]}}}

I think that solution would be starting rabbit_mgmt_sup_sup without any children initialy. And then rabbit_mgmt_sup could be started using either timer:apply_after/4 or implicitly through rabbit_mgmt_db:safe_call/3.

Confusing items per page UI element caption

I find "50 items" in the top right corner to be confusing. Without pagination it made sense. Now we have 2000 queues, 40 pages, 50 items per page — our UI copy should probably suggest that those are items per page.

Alt text

rates_mode not configurable on management agent only nodes.

Since we upgraded our 3 node cluster to rabbitmq 3.5.1 we are seeing these messages in the management ui:

The management statistics database currently has a queue of X events to process. If this number keeps increasing, so will the memory used by the management plugin. You may find it useful to set the rates_mode config item to none.

So as suggested we tried to set rates_mode to none on all three cluster members but only the node where the rabbitmq_management plugin is running picks up the configuration setting from the config file.
On the two other nodes we only run the rabbitmq_management_agentplugin and the management ui show these nodes as running in basic rates_mode even with

 {rabbitmq_management, [
   {rates_mode, none}
 ]}

in the rabbitmq config file.

So it seems only the rabbitmq_management plugin actually loads the {rabbitmq_management, ...} stanza from the config file and nodes only running the agent plugin will default to basic mode regardless of what is specified in the config file.

Wrong terminology for binding key in the UI

In the UI (when you use topic exchanges, go to Exchanges, click on a topic exchange and open the Bindings), the binding key is called Routing Key. That's really confusing and contributes to proliferation of wrong assumptions about how message routing works.

The routing key is the piece of metadata that accompanies a message and is strictly composed of words separated by periods. In contrast, the binding key is associated with a binding and functions as a pattern against which a message's routing key is matched and as such allows some kinds of wildcards. This differentiation is important and should be reflected with correct labels in the UI.

tags_not_present error

Hi there,

We are experiencing an issue when using rabbit-management with a RabbitMQ cluster that loads a json definitions that contains users and permissions. The following chunk when removed (users and permissions), makes no error prompt:

    "users":[
        {
            "name":"example",
            "password_hash":"okEX7BfmebRP2SSGTS/3yFk/wQk=",
            "tags":"administrator"
        }
    ],
    "vhosts":[
        {"name":"example"}
    ],
    "permissions":[
        {
            "user":"example",
            "vhost":"example",
            "configure":".*",
            "write":".*",
            "read":".*"
        }
    ],
    [...]

The node is member of a cluster, after activating the plugin and setting the load definitions against a json file, we need to restart RabbitMQ, this fails and puts in startup_log the following:

 RabbitMQ 3.1.2. Copyright (C) 2007-2013 VMware, Inc.
  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: /var/log/rabbitmq/[email protected]
  ######  ##        /var/log/rabbitmq/[email protected]
  ##########
              Starting broker...

BOOT FAILED
===========

Error description:
   tags_not_present

Log files (may contain more information):
   /var/log/rabbitmq/[email protected]
   /var/log/rabbitmq/[email protected]

Stack trace:
   [{rabbit_mgmt_load_definitions,'-load_definitions/1-fun-0-',1},
    {rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
    {rabbit,run_boot_step,1},
    {rabbit,'-start/2-lc$^0/1-0-',1},
    {rabbit,start,2},
    {application_master,start_it_old,4}]



BOOT FAILED
===========

Error description:
   {could_not_start,rabbit,
       {bad_return,
           {{rabbit,start,[normal,[]]},
            {'EXIT',{rabbit,failure_during_boot,tags_not_present}}}}}

Log files (may contain more information):
   /var/log/rabbitmq/[email protected]
   /var/log/rabbitmq/[email protected]

{"init terminating in do_boot",{rabbit,failure_during_boot,{could_not_start,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{'EXIT',{rabbit,failure_during_boot,tags_not_present}}}}}}}

We have no clue what's going on.

Thanks, regards
Miguel

<server>:15672/# on the management page does not load anything

When going to the page http://:15672/# the screen does not load anything other than the header and the footer. The main div is completely empty, but it does exist. The menu div in the header is also empty, except for the vhost tab. This led to a lot of confusion amongst our team when we were trying to configure RabbitMQ on our machines
rabbitmq

Login failed after upgrade to v3.3.0

I just upgraded my Debian 7 i386 box to RabbitMQ 3.3.0 and I can not log in into management.
My setup is as follows:
{rabbitmq_management,"RabbitMQ Management Console","3.3.0"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.3.0"},
{rabbit,"RabbitMQ","3.3.0"},

My other boxes are Ubuntu with RabbitMQ 3.2.4 and management is working fine.

Any suggestions?

Thank you!

Export/import config on virtual host level

Current export capabilities exports everything set up on the broker – users, virtual hosts, exchanges, queues, policies, etc. This does not allow for easy promotion of messaging topologies from one broker instance to another in a specific virtual host, or several virtual hosts.

It would be helpful if we could export contents of one virtual host (exchanges, queues, bindings, policies), and import it into another virtual host, i.e. the export file would contain only what’s pertinent to a virtual host rather than the entire broker instance, and would not refer to the virtual host by name (so that it can be imported into a virtual host named differently).

Rounding issue with moving averages

Hi guys,

I'm sure you're already aware of this (so apologies if I'm the 1,000th person to report this):

image

The weird rounding can affect the Ready, Unacked and Total values.

Cheers,

Rob

templates overwritten on server restart

Hi,

sorry if this is not the right place, but it sure looks like something out of the ordinary here...

As an example: I try to modify the template for /priv/www/js/tmpl/queues.ejs so it displays number of consumers on each queue. all is good and fine, now if i restart the server template goes back to the original, and I need to edit that template again to have number of consumers listed.

Just could not find any documentation on how that is implemented and why it is overwritten...

anyhow it would be really nice to have a feature to display extra data to the templates currently provided, all the data that is already within the JSON docs and can easily be displayed, we would just need to select which data to show.... any idea if that would be a good feature request?

Cheers!

Switch to upstream Webmachine

We currently pin to a commit in our own fork: rabbitmq/webmachine.

Webmachine is a key dependency for this plugin, we should try to use the upstream version and keep it reasonably up-to-date.

Management API issue

When getting /queues, I notice on one of the results message_stats = [], my deserialization fails because I expect an object here.

It was working fine prior to 3.1. My current fix is to ignore the [] and just return myself an empty message stats object in my app.

Can anyone shed any light into this one?

Thanks

Timestamps on x-axis of charts not in local time

The charts introduced in RabbitMQ 3.1.0 feature timestamps along the x-axis of all graphs. However, the times displayed are in UTC:

timestamps

This is inconsistent with the "Last update" displayed at the bottom of the page, which is displayed in local time. I would expect these times to be consistent with one another:

last_update

Overview page fails with bad_utf8_character_code when DB directory on Windows has non-ASCII characters

Opening rabbitmq management overview page gives me:

Got response code 500 with body {"error":"Internal Server Error","reason":"{error,{exit,{ucs,{bad_utf8_character_code}},\n [{xmerl_ucs,from_utf8,1,[{file,\"xmerl_ucs.erl\"},{line,186}]},\n {mochijson2,json_encode_string,2,[]},\n {mochijson2,'-json_encode_proplist/2-fun-0-',3,[]},\n {lists,foldl,3,[{file,\"lists.erl\"},{line,1262}]},\n {mochijson2,json_encode_proplist,2,[]},\n {mochijson2,'-json_encode_array/2-fun-0-',3,[]},\n {lists,foldl,3,[{file,\"lists.erl\"},{line,1262}]},\n {mochijson2,json_encode_array,2,[]}]}}\n"}

I believe this is because my appdata folder is "C:\Users\João\AppData\Roaming". My guess is that the "ã" is not being properly encoded to utf-8.

Other rabbitmq management pages work fine.

Management port redirection should be smarter

To minimize the attack surface in our production environment we firewall the management console. To attach, I run an ssh tunnel which port forwards to my localhost on a port of my choosing. It appears that at some point the management port was switch from 55672 to 15672 and a redirect to port 15672 was added.

From the behavior, it looks like the logic is to check the http host header and redirect if the port is not 15672. This ends up redirecting to my local rabbit management console. Annoyingly, Chrome will also cache the 301 permanently.

The redirect should either be removed/disabled (I think most people who connect to the rabbit console can figure it out when they upgrade that the port has changed). Alternately, the logic should actually check the socket instead to get the connected port and only redirect if the socket port is not 15672.

Possible Cross site scripting in main.js

After I run security scan against rmq managment console i found this possible security issues:

Line 30:Unsafe client output calling window.location.replace() with tainted arg
Line 29:Assignment of "location" to user-controlled value
Line 29:Result of taint-preserving function call on user-controlled value
Line 29:"location.substr" is controlled by the user

Can we fix it ?

Can't publish via HTTP API with "Accept: application/json"

In RabbitMQ 3.4.2 if you publish a message via the http/mgmt api and set the Accept header to application/json if fails with 406. But if you set it to anything else it works.

curl -i -XPOST -u guest:guest http://localhost:15672/api/exchanges/%2f/amq.default/publish -H "Content-Type: application/json" -H "Accept: application/json" -d'{"properties":{},"routing_key":"a","payload":"b","payload_encoding":"string"}'
HTTP/1.1 406 Not Acceptable
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
Date: Sun, 01 Mar 2015 15:24:09 GMT
Content-Type: application/json
Content-Length: 58

{"error":"Not Acceptable","reason":"\"Not Acceptable\"\n"}
curl -i -XPOST -u guest:guest http://localhost:15672/api/exchanges/%2f/amq.default/publish -H "Content-Type: application/json" -H "Accept: */*" -d'{"properties":{},"routing_key":"a","payload":"b","payload_encoding":"string"}'

HTTP/1.1 200 OK
Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
Date: Sun, 01 Mar 2015 15:25:12 GMT
content-type: application/json
Content-Length: 16
Cache-Control: no-cache

{"routed":false}

Also note how the casing of the response header "Content-Type" differ between the two requests.

Custom response headers

What about including CORS headers in the response?

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

So that the API can be used from other clients?

New health check API endpoints

After talking to some folks from the OpenStack community, I think we should introduce a couple more health check endpoints. Currently the health check will never "leave" the node as it declares a queue it uses locally. One specific idea we have is a health check that ensures that more than half of the known cluster nodes are alive/reachable.

We'll update this issue when more specific ideas emerge.

"make check-xref" broken: unused local functions

Jenkins complains about the following two unused local function:

ERROR: /tmp/test/rabbitmq-public-umbrella/rabbitmq-management/src/rabbit_mgmt_wm_channels_vhost.erl:37 has unused local function(s) rabbit_mgmt_wm_channels_vhost:resource_exists/2
ERROR: /tmp/test/rabbitmq-public-umbrella/rabbitmq-management/src/rabbit_mgmt_wm_connections_vhost.erl:37 has unused local function(s) rabbit_mgmt_wm_connections_vhost:resource_exists/2
make: *** [check-xref] Error 1

requeue option of the Get Messages UI is ignored

When using the "Get Message(s)" button it appears as if a noack with no requeue was sent (look at the graph). But the message is never sent to the dead letter exchange.

If it's intentional then I find it misleading. Spend a few hours messing around with different settings to get it to work. Until I found out that setting TTL was the way to go.

image

empty `deliveries` value (RMQ v3.5.0)

Hi,

I have some clients consuming messages from a queue, and I can see the consumers_details value in the json returned by /api/queues/{vhost}/{queue-name}, but the deliveries value is an empty list. I'm especially missing the message_stats that was previously included.

Could it be a change that was made recently or a configuration option I'm missing?

Thanks

Move from Webmachine to Cowboy

It's a fairly large task involving more than a handful of applications, including management, web-dispatch, web-stomp-examples and many applications depending on management. I will try to maintain the API (and so avoid making changes in these many applications) but they will need to at least be tested to confirm everything works as intended.

The community plugins found at https://www.rabbitmq.com/community-plugins.html should also be checked. Since Webmachine is being removed, there's no other choice than breaking things (plugins include a header from Webmachine), but hopefully that break will be only constrained to resources and will be easy to document and fix.

  • management: port definitions resource multipart handling code to Cowboy
    • curl -i http://guest:guest@localhost:15672/api/definitions -X POST -H "content-type: multipart/form-data;boundary=abcdef"
  • management: git grep wrq
  • management: git grep -i webmachine
  • management: play around in the UI
  • management: tests
  • web dispatch: tests
  • management: add / -> /index.html routes
  • management: add redirects for API etc.
  • management: access logs
  • management: fix crashes found in logs during (successful) tests
  • management: support both IPv4 and IPv6 (#64)
  • management: last clean up, check warnings, unused functions, Dialyzer
  • web dispatch: git grep -i webmachine
  • web dispatch: git grep Req:
  • web dispatch: test with SSL
  • web dispatch: error handler
  • web dispatch: update plugins that use web dispatch
  • web dispatch: last clean up, check warnings unused functions, Dialyzer
  • web dispatch: update README
  • web stomp: make sure examples still work
  • update documentation

Add an "ETA to processed" column for queues

Display how much time is left until all of the messages in a queue will be processed.

It would be based on the 1-minute averages for the rate of messages delivered and acked to the queue.

Wrong JSON data type for empty `publish-properties` in /api/parameters/shovel

If I create a dynamic shovel via pushing to /api/parameters/shovel with a publish-properties attribute like this

 curl -i -u guest:guest -H "content-type:application/json" -XPUT \
-d'{"value":{"dest-exchange":"amq.direct","src-queue":"test","dest-uri":"amqp://", "src-uri":"amqp://","publish-properties":{"user_id":"guest"}}}' \
http://localhost:15672/api/parameters/shovel/%2f/test1

I can see at /api/parameters/shovel/%2f/test1 that the attribute publish-properties is a JSON object. If I instead create a queue with an empty publish-properties like

 curl -i -u guest:guest -H "content-type:application/json" -XPUT \
-d'{"value":{"dest-exchange":"amq.direct","src-queue":"test","dest-uri":"amqp://", "src-uri":"amqp://","publish-properties":{}}}' \
http://localhost:15672/api/parameters/shovel/%2f/test1

the data type of this field is a JSON array instead. Is it possible to either not show the property or use an empty object?

Pagination for connections, channels, exchanges, queues

I have a RabbitMQ cluster with about 6000 queues. When viewing the queues through the management interface, it takes about 8-9 seconds to start sending the response and about 3 seconds to transfer the response. The transfer time can probably be helped by supporting compression, but other than compression or making the result more concise, the transfer time is not the responsibility of the management plugin. The time is the same whether I'm explicitly sorting the list or not. I'm not sure how it's getting the list of queues, but I think it should be much faster.

Improve "network partition detected" warning to give solutions

The following warning is frightening and doesn't give constructive solutions to move forward:

Network partition detected
Mnesia reports that this RabbitMQ cluster has experienced a network partition. This is a dangerous situation. RabbitMQ clusters should not be installed on networks which can experience partitions.

Parallelise statistics DB collector

With a high number of stats-emitting things in a cluster (primarily connections, channels, and queues), statistics collector process gets overwhelmed and begins to use a higher-than-usual amount of RAM and (intentionally) drop stats. This has no correlation with message rates and only triggered by a large number of stats emitting entities.

There are two workarounds:

  • Disabling message rate collection (rates_mode = none)
  • Increasing stats emission interval to 20-30-60 seconds (30 is usually sufficient). This means that management UI will only be updated every 20-30-60 seconds but stats DB load will drop (default emission interval is 5 seconds).

We should look into parallelising it, or at least the parts that are not order-dependent.

A longer term plan is to make the stats DB distributed, store and aggregate results from multiple nodes. This is out of scope of this issue.

UPD: this has a couple of known issues leading to high[-er] RAM usage in 3.6.2. Even though they are fixed in later releases, the single stats node architecture can only go so far, so we've started working on #236.

PUT /api/queues/{vhost}/{name} does not handle `null` node

If a client sends node value = null, rabbit_mgmt_util:http_to_amqp/5 fails with:

=ERROR REPORT==== 23-Mar-2015::15:29:19 ===
webmachine error: path="/api/queues/%2F/hop.test"
{error,{error,badarg,
              [{erlang,binary_to_list,[null],[]},
               {rabbit_mgmt_util,http_to_amqp,5,[]},
               {webmachine_resource,resource_call,3,[]},
               {webmachine_resource,do,3,[]},
               {webmachine_decision_core,resource_call,1,[]},
               {webmachine_decision_core,accept_helper,1,[]},
               {webmachine_decision_core,decision,1,[]},
               {webmachine_decision_core,handle_request,2,[]}]}}

Inspecting the code suggests it only handles undefined values.

Management DB crashes with 'badarith' if fd_used or disk_free temporarily unavailable

From an escalation:

 =ERROR REPORT==== 17-Feb-2015::21:14:31 ===
** Generic server rabbit_mgmt_db terminating
** Last message in was {'$gen_cast',
{event,
{event,node_stats,
<snip>
** Reason for termination ==
** {badarith,[{rabbit_mgmt_db,append_sample,6,[]},
{rabbit_mgmt_db,'-append_samples/6-lc$^1/1-0-',6,[]},
{rabbit_mgmt_db,append_samples,6,[]},
{rabbit_mgmt_db,handle_stats,6,[]} 
<snip>

So we get a badarith recording samples from node_stats - how can that be? append_sample/6 guards against the new value not being a number, but does not check the old value from the old_stats table. Looking at rabbit_mgmt_external_stats, both fd_used and disk_free can return atoms when they failed to parse some external command.

Probably append_sample/6 should just ignore the case where the old stat is not a number.

Timestamps returned by `erlang:now()` can be confusing

stobix on #rabbitmq reports that some timestamps in the management UI (eg. the charts) don't match the wall clock time.

In his test case, erlang:now() slowly drifts apart from erlang:time() for instance. A way to reproduce it is to suspend/resume the computer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.