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
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 ».
5 thoughts on “RabbitMQ plugin for Collectd”
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,
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 ?
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
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.
Great ! it is running fine.
Good script ! Easly and usefull.
I tried others Rabbit mq but for me this is the best