Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphite tagged metrics and match '\;' #369

Closed
kolobaev opened this issue Jul 10, 2019 · 1 comment
Closed

graphite tagged metrics and match '\;' #369

kolobaev opened this issue Jul 10, 2019 · 1 comment

Comments

@kolobaev
Copy link

kolobaev commented Jul 10, 2019

carbon-c-relay version : 3.5

Hi! I want to use separate rules for processing tagged metrics, and for this I have a separate section in the config:

...
match
    \;
  send to graphite
  stop
  ;
...

But, carbon-c-relay crashed =( :
cat /var/log/carbon-c-relay:

[2019-07-10 17:39:00] (MSG) starting carbon-c-relay v3.5 (2019-02-22), pid=25556
configuration:
    relay hostname = graphite-test
    workers = 56
    send batch size = 20000
    server queue size = 10000000
    server max stalls = 4
    listen backlog = 32
    server connection IO timeout = 5000ms
    idle connections disconnect timeout = 10m
    extra allowed characters = +/=_-:#
    configuration = /etc/carbon-c-relay.conf

[2019-07-10 17:39:00] (ERR) failed to read configuration '/etc/carbon-c-relay.conf'

The"; " symbol is the only indication that this metric is tagged and should be treated as something special

@grobian
Copy link
Owner

grobian commented Jul 11, 2019

ok, when I try this:

testconf:5:14: syntax error, expecting 'statistics'
match \; send to foo stop;
              ^

What regex library did you configure with? (relay -v will show)

It's not clear to me the relay actually crashes, because it throws an error about not being able to read the configuration (it does so for me too).

So, I tried this, which works:

match ";" send to foo stop;

I just noticed that the printback doesn't quote the ; so that's obviously wrong, but it does work that way. (You can quote expressions like that to deal with spaces and odd chars safely.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants