Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core metrics: remove backing_queue_status from the core metrics #9578

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

dcorbacho
Copy link
Contributor

They will not show in the HTTP API GET /api/queues, but are still available whenever the queue info is requested through the rabbit_amqqueue API.

GET /api/queues is widely used and abused without pagination and often to retrieve just a single metric. This change will considerable reduce the size of the JSON response when querying 10s or 100s of queues, and it should not impact the operation of the system as backing_queue_status is an internal metric on which no monitoring tool should rely on.

References #9437

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

@dcorbacho dcorbacho added this to the 3.13.0 milestone Sep 28, 2023
They will not show in the HTTP API GET /api/queues, but are still
available whenever the queue info is requested through the
rabbit_amqqueue API
@michaelklishin michaelklishin force-pushed the remove-backing-queue-stats branch from c071f72 to 0f7de92 Compare September 28, 2023 17:07
@michaelklishin michaelklishin merged commit ec0dfb9 into main Sep 28, 2023
1 check passed
@michaelklishin michaelklishin deleted the remove-backing-queue-stats branch September 28, 2023 22:01
michaelklishin added a commit that referenced this pull request Oct 2, 2023
Core metrics: remove backing_queue_status from the core metrics (backport #9578)
@gomoripeti
Copy link
Contributor

I wonder how the mgmt UI queries individual queue info (on the single queue page)? As it gets the displayed "queue storage version" from the backing_queue_status field. (https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_management/priv/www/js/formatters.js#L198)

@dcorbacho
Copy link
Contributor Author

Thanks for the heads up @gomoripeti, that one is going to be reintroduced as a top-level key.

@H4rry12
Copy link

H4rry12 commented Jan 4, 2024

Hello,

I am trying to implement drain time measurement fot Rabbitmq queues.
Before this change I used script simillar to https://github.com/sensu-plugins/sensu-plugins-rabbitmq/blob/master/bin/check-rabbitmq-queue-drain-time.rb#L137
secs_till_empty = queue['messages'] / queue['backing_queue_status']['avg_egress_rate']

I there any way how to obtain backing_queue_status now? How i can access mentioned "rabbit_amqqueue API"
I am not able to find some solution...

@michaelklishin
Copy link
Member

@H4rry12 you can obtain a queue's ingress and egress rates without using this leaked (and now removed) implementation detail. That's how management UI is still able to provide them, it does not use any internal or hidden API endpoints.

Start with localhost:15672/api/ (assuming a locally running node). Do not use GET /api/queues to only get one metric of one queue, that's extremely expensive and wasteful.

@jpanynines
Copy link

@michaelklishin on the commit message is said that we can still get these backing_queue_status metrics using amqqueue API. Can you give us more information on how to do that? I used the bunny library to connect to an rabbitmq 3.13 server and did not saw any way to get this information. Maybe I am using the wrong lib? Thank you in advance for your time.

@michaelklishin
Copy link
Member

The metrics removed here are implementation details. They are not supposed to be used. In fact, when CQv1 are removed completely (most likely in 4.1), they won't be available.

@michaelklishin
Copy link
Member

michaelklishin commented Jun 6, 2024

Node metrics are not consumed using messaging protocol libraries. See Monitoring.

@rabbitmq rabbitmq locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants