4

Using "rabbitmqctl eval 'rabbit_shovel_status:status().'" I can get the shovels status in my rabbitmq server.

I activated the modules 'rabbitmq_shovel' and 'rabbitmq_shovel_management'.

I created some dynamic shovels with the HTTP API, the problem I have is that, I want to be able to GET the status of the shovels using the HTTP API, but I can't find a way to do that.

Is there any way to do this using the HTTP API? Or should I use 'rabbitmqctl eval ...'?

I don't want to use the rabbitmqctl, as I want to expose this data in my own API, so my application should be able to access it, without having to make an 'exec'.

kurco19
  • 43
  • 1
  • 3

2 Answers2

6

Yes you can using:

http://localhost:15672/api/shovels

you have to install: rabbitmq_shovel_management

The result is a json like:

[  
   {  
      "node":"rabbit@gabrieleMacBook",
      "timestamp":"2015-06-02 15:34:27",
      "name":"test",
      "vhost":"/",
      "type":"dynamic",
      "state":"running",
      "definition":{  
         "src-queue":"test",
         "dest-queue":"test2"
      },
      "src_uri":"amqp://xxxxxxx",
      "dest_uri":"amqp://xxxxxxx"
   }
]
Gabriele Santomaggio
  • 21,656
  • 4
  • 52
  • 52
0

If you are using C#, you can use HareDu like this:

var result = await _services.GetService<IBrokerObjectFactory>()
    .GetAllShovels();

https://github.com/ahives/HareDu2/blob/master/docs/shovel-get.md

Albert
  • 33
  • 6