subhrendus / rocksteady

Automatically exported from code.google.com/p/rocksteady
0 stars 0 forks source link

AMQP metrics format does not match graphite #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to send just one set of stats to an AMQP exchange for consumption by 
both rocksteady and graphite -- but they seem to expect slightly different 
formats.

Rocksteady expects a message to have: "metric_name value timestamp"

graphite expects the message to have metric_name as the routing key, and the 
message just: "value timestamp"

There could be a config option to use the routing key as metric name, and only 
expect "value timestamp" in the payload.

Original issue reported on code.google.com by petefbsd on 19 Jan 2011 at 6:50

GoogleCodeExporter commented 9 years ago
you're right, the graphite supported rabbitmq message is a little different 
from what we use. 

Let me make it as an option.

Original comment by ma...@google.com on 19 Jan 2011 at 7:08

GoogleCodeExporter commented 9 years ago
OK. I'll try to work on a patch later today if I have time.

Original comment by petefbsd on 19 Jan 2011 at 7:24

GoogleCodeExporter commented 9 years ago
It looks like graphite can also handle a single AMQP message with multiple 
metric strings ("\n" separated).

Original comment by petefbsd on 20 Jan 2011 at 12:07

GoogleCodeExporter commented 9 years ago
Here is an initial patch to take more than one metric in a single message. It 
also prints a debug stack trace for the initial exception in 
c.a.r.util.ROCKSTEADYSystemException (hard to debug when exceptions are caught 
& re-thrown) and we pass durability/auto-delete options to exchangeDeclare 
(rabbitmq doesn't like two different clients trying to declare the same 
exchange with different settings).

The more I think about it, the more I like your scheme of putting the metric in 
the name for AMQP messages. That's how graphite TCP metrics look, and I don't 
see why it should be any different with AMQP messages. With their current 
design, you can't send a bulk of updates in a single message for different 
metric keys. To that end, I submitted a patch to them to take metric name in 
the AMQP body: https://bugs.launchpad.net/graphite/+bug/705613

Original comment by petefbsd on 21 Jan 2011 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
AWesome, will put it in.

Original comment by ma...@google.com on 24 Jan 2011 at 6:57

GoogleCodeExporter commented 9 years ago
Patch merged in.  Thanks.

Original comment by ma...@google.com on 25 Jan 2011 at 2:16