grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

Rewrite function doesn't work with tags #459

Closed Rohlik closed 8 months ago

Rohlik commented 8 months ago

Hello @grobian, Thanks for this excellent tool 👍🏼.

We have an issue with a config snippet below:

rewrite ^collectd.rack-na.(.*).(.*).(.*).uptime.uptime
  into collectd.rack-na.\1.\2.\3.uptime.uptime;foo=bar
;

We are getting this app error:

[2023-12-13 13:41:14] (ERR) /etc/carbon-c-relay.conf:89:47: syntax error, expecting end of file
[2023-12-13 13:41:14] (ERR)   into collectd.rack-na.\1.\2.\3.uptime.uptime;foo=bar
[2023-12-13 13:41:14] (ERR)                                                ^
[2023-12-13 13:41:14] (ERR) failed to read configuration '/etc/carbon-c-relay.conf'

We run the binary as follows:

/usr/bin/carbon-c-relay -f /etc/carbon-c-relay.conf -c -_:#^ -b 2500 -q 7500000 -l /mnt/log/carbon-c-relay/carbon-c-relay.log -B 64

We want to achieve an append tag for some metrics' categories here. Can you help? Do we misuse it?

grobian commented 8 months ago

Can you try if quoting the into works? e.g. into "collectd.blanal\1\2\3;fnord";

Rohlik commented 8 months ago

Great, your advice works 👍🏼!