RabbitMQ plugin for Collectd


Hello all,

I wrote a rudimentary RabbitMQ plugin for Collectd.  If that sounds interesting to you, feel free to take a look at my GitHub.  The plugin itself is written in Python and makes use of the Python plugin for Collectd.

It will accept four options from the Collectd plugin configuration :

Locations of binaries :

RmqcBin = /usr/sbin/rabbitmqctl
PmapBin = /usr/bin/pmap
PidofBin = /bin/pidof

Logging :

Verbose = false

It will attempt to gather the following information :

From « rabbitmqctl list_queues » :

messages
memory
consumser

From « pmap » of « beam.smp » :

memory mapped
memory writeable/private (used)
memory shared

Props to Garret Heaton for inspiration and conceptual guidance from his « redis-collectd-plugin ».

, , ,

  1. #1 by Ben Hoyt on 2013/01/18 - 01:04

    Thanks for publishing this. I’ve been working to integrate it in our monitoring system. I’ve run into a problem where, when collectd calls the plugin, and the plugin calls rabbitmqctl to get the ctl_* metrics, the plugin is unable to launch rabbitmqctl. The output is:

    Error spawning /usr/lib64/erlang/erts-5.8.5/bin/epmd -daemon (error 10)

    collectd is running as root.

    However, when I run the plugin code from a regular terminal (not called via collectd), the rabbitmqctl execution succeeds and the plugin gets the ctl_* values.

    Any thoughts on that problem?

    Thanks in advance,

    Ben

  2. #2 by dan on 2013/01/18 - 12:24

    Ben Hoyt :

    Error spawning /usr/lib64/erlang/erts-5.8.5/bin/epmd -daemon (error 10)

    To be honest, I have no idea. :( Have you tried strace’ing the process to see if it’s failing at a particularly interesting point ?

  3. #3 by Thomas Papiernik on 2013/03/15 - 13:57

    Very nice but like Ben Hoyt :

    rabbitmq_info: Line: Error spawning /usr/lib/erlang/erts-5.8.5/bin/epmd -daemon (error 10)

    collectd is running as root also

    Thanks,

    Thomas

  4. #4 by dan on 2013/03/15 - 14:34

    And, like my response to Ben Hoyt, I still have no idea. Have you tried stracing to see if it’s failing anywhere interesting ? If you have a Github account, feel free to open an issue and we can try to work on it together, if you like.

(will not be published)


+ 3 = 8