carbon-relay-ng icon indicating copy to clipboard operation
carbon-relay-ng copied to clipboard

Default route support

Open deejay1 opened this issue 9 years ago • 7 comments

To ease the migration (and IMHO common usage) from stock carbon-relay it would be nice to have a "first match" rule, where the rule processing would stop as soon as the incoming metric matches one. Right now even if we match a metric it goes through other regexes and can be sent to multiple destinations.

deejay1 avatar Jun 08 '16 12:06 deejay1

is creating a SendFirstMatch route with multiple destinations not the right answer to this?

Dieterbe avatar Jun 08 '16 12:06 Dieterbe

@Dieterbe - can you please copy/paste some code example here?

mrh666 avatar Jun 08 '16 17:06 mrh666

addRoute sendFirstMatch main  graphite1:2003 prefix=prod. spool=true pickle=true  graphite2:2003 spool=true pickle=true

Dieterbe avatar Jun 08 '16 17:06 Dieterbe

sendFirstMatch doesn't work here because we need multiple regular expressions, eg (in natural language)

prod.foo.* send to graphite1:2003, graphite2:2003
prod.bar.* send to graphite3:2003, graphite4: 2003
prod.* send to graphite5:2003, graphite6:2003

Currently prod.foo.* would be send to graphite1/2 and graphite5/6 as far as I understand the config format (I may be wrong of course ;)

deejay1 avatar Jun 09 '16 07:06 deejay1

+1

maggnus avatar Jan 10 '17 07:01 maggnus

SendFirstMatch also does not let you use consistent hashing to distro the load to multiple storage backends =(

+1 for this

popsikle avatar Apr 12 '17 19:04 popsikle

because we need multiple regular expressions,

note that multiple regex can always be turned into 1 regex like so: regex1|regex2|regex3

Currently prod.foo.* would be send to graphite1/2 and graphite5/6 as far as I understand the config format (I may be wrong of course ;)

if using multiple routes, then yes, if multiple destinations with SendFirstMatch, then not. (that was the intention behind the separate concepts of routes and destinations, that you can pick the behavior you want)

It sounds like the only real remaining problem here is that we would want to support a destination (that can be used with SendFirstMatch) being a pool of servers (to be used as a consistent hashing pool)

Dieterbe avatar May 30 '19 14:05 Dieterbe