[rabbitmq-discuss] RabbitMQ and Splunk

Michael Vierling MVierling at attinteractive.com
Sat Oct 30 01:13:12 BST 2010

We're developing a Splunk plugin for RabbitMQ.  Splunk is an excellent log search engine and we highly recommend it.  Anyway, while Splunk can ingest almost any log files, it prefers a key-value pair format.  You can see this page for more details:


So in that spirit, I'd like to propose the following patch to the rabbitmqadmin script, which ships with your management 2.1.1 plugin.  This patch adds a key-value pair Splunk compatible option (kvp) to the script.  It would be very helpful if this could be incorporated into the official Management plugin.


[root at tdbrabbit1 bin]# diff attadmin rabbitmqadmin
< import datetime
<                       help="format for listing commands - one of [pretty_json, raw_json, table, tsv, kvp, long]  [default: %default]")
>                       help="format for listing commands - one of [pretty_json, raw_json, table, tsv, long]  [default: %default]")
<     elif format == "kvp":
<         formatter = KVPList
< class KVPList(Lister):
<     def __init__(self, options):
<         self.options = options
<     def display_list(self, columns, table):
<         fmt = "{0} = {1}, "
<         timestamp = datetime.datetime.now()
<         line = ""
<         for i in xrange(0, len(table)):
<             line = str(timestamp) + ", "
<             for j in xrange(0, len(columns)):
<                 line += fmt.format(columns[j], table[i][j])
<             print line

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20101029/e3d048cb/attachment.htm>

More information about the rabbitmq-discuss mailing list