[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:
http://www.splunk.com/wiki/Apps:Common_Information_Model
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.
Best,
Michael
[root at tdbrabbit1 bin]# diff attadmin rabbitmqadmin
9d8
< import datetime
124c123
< 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]")
284,285d282
< elif format == "kvp":
< formatter = KVPList
358,371d354
< 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