opencti
opencti copied to clipboard
[backend] Retrieve RabbitMQ metrics of vhost only
Proposed changes
- Fix the
WorkersStatusto retrieve only statistics on vhost used by OpenCTI.
In order to do so, replace the use of the api/overview query with api/vhosts/${VHOST} to retrieve statistics on all the queues of the vhost; and the use of ~api/version~ api/overview to retrieve the version of RabbitMQ (used in the settings). Edit: use api/overview for the version, api/version is only available to rabbitmq >=4.0
Related issues
- #10036
Checklist
- [x] I consider the submitted work as finished
- [x] I tested the code for its functionality
- [ ] I wrote test cases for the relevant uses case (coverage and e2e)
- [ ] I added/update the relevant documentation (either on github or on notion)
- [ ] Where necessary I refactored code to improve the overall quality
Further comments
As visible on the snapshot, number of messages from the test vhost are not taken into account when using root vhost for opencti (contrary to the one in the issue):
And when using another vhost, e.g. opencti, other vhost are not taken into account: